Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Simple DSL for data transformation
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
.jsbeautifyrc
.jshintrc
Gruntfile.js
README.md
package.json

README.md

Masseur

Simple library for data transformation.

Install

npm install masseur --save

Usage

var Transform = require('masseur').Transform;
var Processors = require('masseur').Processors;

var transformer = (new Transform())
  // copy directly from input
  .key('userName')

  // copy from input object's `first_name` field
  .key('firstName')
  .src('first_name')
  // convert name to lowercase
  .use(Processors.lowercase)
  // filter out black listed words
  .use(Processors.filter);


// transform a single object
var output = trasformer.transform(input);

// transform a stream of inputs
var transformStream = transfomer.createStream();
transformStream.pipe(inputStream);
Something went wrong with that request. Please try again.