Skip to content

building5/cls-es6-promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cls-es6-promise

cls-es6-promise provides a shim layer for es6-promise so that it will work with continuation-local-storage. It does this by binding all callbacks passed to then and catch with a CLS namespace.

var cls = require('continuation-local-storage');
var ns = cls.createNamespace('NODESPACE');

var Promise = require('es6-promise').Promise;
// or require('es6-promise').polyfill();

// load shim
require('cls-es6-promise')(ns);

tests

The tests can be run with npm test.

About

Continuation local storage shim for es6-promise

Resources

License

Stars

Watchers

Forks

Packages

No packages published