修改后台权限
This commit is contained in:
22
node_modules/get-own-enumerable-keys/index.d.ts
generated
vendored
Normal file
22
node_modules/get-own-enumerable-keys/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
Like [`Object.keys()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys) but also includes [symbols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)
|
||||
|
||||
@example
|
||||
```
|
||||
import getOwnEnumerableKeys from 'get-own-enumerable-keys';
|
||||
|
||||
const symbol = Symbol('x');
|
||||
|
||||
const object = {
|
||||
foo: true,
|
||||
[symbol]: true,
|
||||
};
|
||||
|
||||
Object.keys(object);
|
||||
// ['foo']
|
||||
|
||||
getOwnEnumerableKeys(object);
|
||||
//=> ['foo', Symbol('x')]
|
||||
```
|
||||
*/
|
||||
export default function getOwnEnumerableKeys(object: object): Array<string | symbol>; // eslint-disable-line @typescript-eslint/ban-types
|
||||
9
node_modules/get-own-enumerable-keys/index.js
generated
vendored
Normal file
9
node_modules/get-own-enumerable-keys/index.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
const {propertyIsEnumerable} = Object.prototype;
|
||||
|
||||
export default function getOwnEnumerableKeys(object) {
|
||||
return [
|
||||
...Object.keys(object),
|
||||
...Object.getOwnPropertySymbols(object)
|
||||
.filter(key => propertyIsEnumerable.call(object, key)),
|
||||
];
|
||||
}
|
||||
9
node_modules/get-own-enumerable-keys/license
generated
vendored
Normal file
9
node_modules/get-own-enumerable-keys/license
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
44
node_modules/get-own-enumerable-keys/package.json
generated
vendored
Normal file
44
node_modules/get-own-enumerable-keys/package.json
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "get-own-enumerable-keys",
|
||||
"version": "1.0.0",
|
||||
"description": "Like `Object.keys()` but also includes symbols",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/get-own-enumerable-keys",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"types": "./index.d.ts",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.16"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"object",
|
||||
"own",
|
||||
"enumerable",
|
||||
"keys",
|
||||
"key",
|
||||
"property",
|
||||
"properties",
|
||||
"symbol",
|
||||
"symbols"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^5.1.1",
|
||||
"tsd": "^0.25.0",
|
||||
"xo": "^0.53.1"
|
||||
}
|
||||
}
|
||||
32
node_modules/get-own-enumerable-keys/readme.md
generated
vendored
Normal file
32
node_modules/get-own-enumerable-keys/readme.md
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# get-own-enumerable-keys
|
||||
|
||||
> Like [`Object.keys()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys) but also includes [symbols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)
|
||||
|
||||
`Object.keys()` returns the own enumerable keys of an object except symbols (for legacy reasons). This package includes symbols too.
|
||||
|
||||
Use [`Reflect.ownKeys()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/ownKeys) if you also want non-enumerable keys.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install get-own-enumerable-keys
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import getOwnEnumerableKeys from 'get-own-enumerable-keys';
|
||||
|
||||
const symbol = Symbol('x');
|
||||
|
||||
const object = {
|
||||
foo: true,
|
||||
[symbol]: true,
|
||||
};
|
||||
|
||||
Object.keys(object);
|
||||
// ['foo']
|
||||
|
||||
getOwnEnumerableKeys(object);
|
||||
//=> ['foo', Symbol('x')]
|
||||
```
|
||||
Reference in New Issue
Block a user