Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kjirou/npm-recursive-keys
Do "Object.keys" recursively
https://github.com/kjirou/npm-recursive-keys
Last synced: 12 days ago
JSON representation
Do "Object.keys" recursively
- Host: GitHub
- URL: https://github.com/kjirou/npm-recursive-keys
- Owner: kjirou
- License: mit
- Created: 2014-07-31T03:12:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-08-31T07:36:28.000Z (about 3 years ago)
- Last Synced: 2024-09-15T17:53:49.482Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
npm-recursive-keys
==================Object.keys recursively
## Supported Node.js and Browsers
- `Node.js >= 0.10.0`
- `Chrome`
- `Firefox`
- `Safari`
- `Mobile Safari`
- `PhantomJS`
- `IE10`, `IE9`, `IE8`, `IE7` (..probably!)## Examples of Use
### Node.js
```
npm install recursive-keys
``````
var dumpKeysRecursively = require('recursive-keys').dumpKeysRecursively;console.log(dumpKeysRecursively({
x: 1,
y: [1, 2],
z: {a: 1}
}));// Output:
// [
// "x",
// "y.0",
// "y.1",
// "z",
// "z.a"
// ]
```### Browsers
Please install by copying the [recursive_keys.js](https://raw.githubusercontent.com/kjirou/npm-recursive-keys/master/lib/recursive_keys.js).
```
```
```
var dumpKeysRecursively = recursiveKeys.dumpKeysRecursively;
```## Development
### Preparation
- Read [package.json](./package.json).
- Install [PhantomJS](http://phantomjs.org/). e.g. `brew install phantomjs`### Deployment
```
git clone [email protected]:kjirou/npm-recursive-keys.git
cd ./npm-recursive-keys
npm install
```