Ejemplo n.º 1
0
    function templateLookup (chunk, word) {
      var result = dotpather(word)(obj)

      if (result === undefined) {
        result = ''
      }

      return result
    }
Ejemplo n.º 2
0
function dotpathStream(path, fallback) {
  var lookup = dotpather(path)

  return through(doLookup)

  function doLookup(data) {
    var value = lookup(data)

    if(typeof value === 'undefined') {
      value = fallback
    }

    this.queue(value)
  }
}