cancelable
Cancelable functions (Underscore/Lodash compatible)
Last updated 14 years ago by fgribreau .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install cancelable 
SYNC missed versions from official npm registry.

Cancelable Build Status

Cancelable functions for JavaScript.

Getting Started

Install the module with: npm install cancelable

Examples

var Cancelable = require('cancelable');
var fn = Cancelable(function(){console.log('plop');});
fn(); // print "plop"
fn.cancel();
fn(); // do nothing

Cancelable is compatible with Underscore and Lodash as a mixin.

var _ = require('underscore');
_.mixin(require('cancelable').exports());
var fn = _.cancelable(function(){console.log('plop');});
fn(); // print "plop"
fn.cancel();
fn(); // do nothing

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Release History

v0.1.0 3/17/2013 Initial release.

License

Copyright (c) 2013 Francois-Guillaume Ribreau Licensed under the MIT license.

Current Tags

  • 0.1.0                                ...           latest (14 years ago)

1 Versions

  • 0.1.0                                ...           14 years ago
Maintainers (1)
Downloads
Total 4
Today 1
This Week 1
This Month 2
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE