0.1.0 • Published 8 years ago

fn-array v0.1.0

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

fn-array

ES6 function array. Typed array accepts only function as element.

Example

let FunctionArray = require('fn-array');

let arr = FunctionArray
  .create()
  .use(function foo() { return 'foo'; })
  .use(function bar() { return 'bar'; });
  
let fn;
let it = arr.iterator();
while(fn = it.next().value) {
  fn();
}

Install

npm install fn-array --save

License

MIT