extract-object

v1.0.0
Extract text tokens from serializable object

extract-object

Extract text tokens from serializable object.

Build Status

npm install extract-object

extract(obj, [tokens])

Extract text tokens from serializable obj, optionally pass array tokens as reference.

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

npm i extract-object

Metadata

  • MIT
  • Whatever
  • Adrian C Shum
  • released 9/17/2015

Downloads

Maintainers