0.1.0 • Published 8 years ago

fn-map v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

fn-map

ES6 function map. Typed map using string as key and function as value.

Example

let FunctionMap = require('fn-map');

let map = FunctionMap
  .create()
  .use('foo', () => 'foo')
  .use('bar', () => 'bar');

map.get('foo')(); // foo
map.get('bar')(); // bar

Install

npm install fn-map --save

License

MIT