lib/js-transform.js
function yamlTransform (filename) {
  if (!/\.yml|\.yaml$/i.test(filename)) {
    return through()
  }

  return through(function (buf, enc, next) {
    this.push(
      'module.exports=' + JSON.stringify(YAML.parse(buf.toString('utf8')))
    )
    next()
  })
}
function yamlTransform (filename) {
  if (!/\.yml|\.yaml$/i.test(filename)) {
    return through()
  }

  return through(function (buf, enc, next) {
    this.push(
      'module.exports=' + JSON.stringify(YAML.parse(buf.toString('utf8')))
    )
    next()
  })
}
function yamlTransform ( filename ) { if ( ! / \.yml|\.yaml$ / i . test ( filename ) ) { return through ( ) } return through ( function ( buf , enc , next ) { this . push ( 'module.exports=' + JSON . stringify ( YAML . parse ( buf . toString ( 'utf8' ) ) ) ) next ( ) } ) }
Transform an YAML file to a module containing a JSON string
Transform an YAML file to a module containing a JSON string