JSPM

cancelable

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 28
  • Score
    100M100P100Q60933F

Cancelable functions (Underscore/Lodash compatible)

Package Exports

  • cancelable

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cancelable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.