jmeta.js
/**
 * Get an array of unique found keys for the parsed object.
 * @param {object} options - Options to filter keys on.
 * @param {number} options.depth - Only return keys at a given depth.
 */
Get an array of unique found keys for the parsed object.
@param {object} options - Options to filter keys on.
@param {number} options.depth - Only return keys at a given depth.
Get an array of unique found keys for the parsed object . @param { object } options - Options to filter keys on . @param { number } options . depth - Only return keys at a given depth .
keys ({ depth } = {}) {
    if ((depth !== undefined) && (!_.isNumber(depth) || isNaN(depth))) throw new Error('"depth" must be a number')
    let results = []
    for (let key of this._map.keys()) {
      if (depth) {
        if (this._map.get(key).filter(v => v.depth === depth).length) results.push(key)
      } else {
        results.push(key)
      }
    }
    return results
  }
keys ( { depth } = { } ) { if ( ( depth !== undefined ) && ( ! _ . isNumber ( depth ) || isNaN ( depth ) ) ) throw new Error ( '"depth" must be a number' ) let results = [ ] for ( let key of this . _map . keys ( ) ) { if ( depth ) { if ( this . _map . get ( key ) . filter ( v => v . depth === depth ) . length ) results . push ( key ) } else { results . push ( key ) } } return results }
Get an array of unique found keys for the parsed object.
Get an array of unique found keys for the parsed object .