INNER CODE UNIT · JavaScript

push

sheerun/graphqlviz · index.js:196

  var push = (v, k) => {
    q.push({ key: k, path: current.path + '["' + k + '"]' })
  }
  while (q.length) {
    current = q.shift()
    currentNode = _.get(obj, current.path)
    retval = iter(currentNode, current.key, current.path)
    if (retval) {
      return retval
    }

    if (_.isPlainObject(currentNode) || _.isArray(currentNode)) {
      _.each(currentNode, push)
    }
  }
}

var SchemaTypeSymbol = '__GraphQLVizSchema__'

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…