all-object-keys

2018-10-23 admin

all-object-keys是什么

什么是all-object-keys,get all keys of object

all-object-keys使用教程帮助文档

all-object-keys License NPM version Dependency Status Build Status Coverage Status

Get all keys of object. Use jessy to get value. Use 问答 iis7站长之家 to set value.

Install

npm i all-object-keys --save

Hot to use?

const keys = require('all-object-keys');
keys({
    universal: true,
    hello: {
        world: {
            'could be used in browser as well'
        }
    }
});
// returns
['universal', 'hello.world']

Environments

In old node.js environments that supports es5 only, all-object-keys could be used with:

var keys = require('all-object-keys/legacy');

In browser:

<script src=/"dist&/index.html
<script>
    allkeys('.', {
        could: {
            be: 'used'
        }
    });
    // returns
    ['could.be']
</script>

Related

License

MIT

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-43450.html

文章标题:all-object-keys

回到顶部