Skip to content

mweitzel/method-chain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

method-chain

Simple utility function to wrap a value and chain methods against it.

Starts with data and chains function output as input to the next.

Retrieve current value with .value

Installation

$ npm install mw-method-chain

Example

var chain = require('mw-method-chain')
  , double = function(num) { return num * 2 }

chain(1000)
  (double)
  (double)
  (double)
  .value

// returns 8000

License

MIT

About

simple utility function to wrap a value and chain methods against it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published