UNPKG

transformify

Version:

Takes a synchronous function that transforms a string and converts it into a transform compatible with browserify, catw and mutiny.

22 lines (16 loc) 463 B
'use strict'; /*jshint asi: true */ var test = require('tap').test , applyTransform = require('apply-transform') , transformify = require('../') function toUpper(s) { return s.toUpperCase(); } /*test('\nsimple upper case transform fn', function (t) { var transform = transformify(toUpper); applyTransform(transform(), 'hello world', function (err, res) { if (err) { t.fail(err); t.end() } t.equal(res, 'HELLO WORLD') t.end(); }) })*/