https://github.com/cshum/extract-object
Extract text tokens from serializable object
https://github.com/cshum/extract-object
Last synced: 29 days ago
JSON representation
Extract text tokens from serializable object
- Host: GitHub
- URL: https://github.com/cshum/extract-object
- Owner: cshum
- License: mit
- Created: 2015-09-17T05:37:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-17T07:00:34.000Z (over 9 years ago)
- Last Synced: 2025-03-01T12:49:34.907Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 125 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# extract-object
Extract text tokens from serializable object.
[](https://travis-ci.org/cshum/extract-object)
```
npm install extract-object
```### extract(obj, [tokens])
Extract text tokens from serializable `obj`, optionally pass array `tokens` as reference.
```js
var extract = require('extract-object')console.log(extract({
a: 'foo bar',
c: ['hello'],
d: { asdf: { ghjk: 'world' } },
e: 167,
f: null
}))// ['foo bar', 'hello', 'world']
```## License
MIT