metafizzy/transfob

Name: transfob

Owner: Metafizzy

Description: get a transform stream, like through2.obj()

Created: 2016-11-02 13:03:40.0

Updated: 2016-11-02 13:12:12.0

Pushed: 2016-11-02 13:12:04.0

Homepage: null

Size: 1

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

transfob

Get a transform stream, like through2.obj(). Useful for gulp tasks where you want to iterate over files.

transfob = require('transfob');

onvert files to JS object
data = {};

.task( 'data', function() {
turn gulp.src('data/*.md')
.pipe( transfob( function( file, enc, next ) {
  var basename = path.basename( file.path, path.extname( file.path ) );
  data[ file.path ] = file.contents.toString();
  next( null, file );
}) );


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.