Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

future

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

future - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

README.md

21

future.js

@@ -17,3 +17,3 @@ (function () {

function future(global_context) {
function future(global_context, options) {
var everytimers = {},

@@ -35,2 +35,6 @@ onetimers = {},

options = options || {};
options.error = options.error || function (err) {
throw err;
};

@@ -102,3 +106,4 @@ function resetTimeout() {

if (true !== new_asap && false !== new_asap) {
throw new Error("Future.setAsap(asap) accepts literal true or false, not " + new_asap);
options.error(new Error("Future.setAsap(asap) accepts literal true or false, not " + new_asap));
return;
}

@@ -169,3 +174,4 @@ asap = new_asap;

if (fulfilled) {
throw new Error("`Future().fulfill(err, data, ...)` renders future deliveries useless");
options.error(new Error("`Future().fulfill(err, data, ...)` renders future deliveries useless"));
return;
}

@@ -222,3 +228,4 @@ var args = Array.prototype.slice.call(arguments);

if ('function' !== typeof callback) {
throw new Error("Future().whenever(callback, [context]): callback must be a function.");
options.error(new Error("Future().whenever(callback, [context]): callback must be a function."));
return;
}

@@ -228,3 +235,3 @@

// TODO log
throw new Error("Future().everytimers is a strict set. Cannot add already subscribed `callback, [context]`.");
options.error(new Error("Future().everytimers is a strict set. Cannot add already subscribed `callback, [context]`."));
return;

@@ -290,5 +297,5 @@ }

function Future(context) {
function Future(context, options) {
// TODO use prototype instead of new
return (new future(context));
return (new future(context, options));
}

@@ -295,0 +302,0 @@

{
"name": "future",
"version": "2.1.1",
"version": "2.2.0",
"description": "The promise / subscribe / deferred module of FuturesJS (Ender.JS and Node.JS)",

@@ -19,4 +19,5 @@ "homepage": "https://github.com/coolaj86/futures",

"engines": {
"node": "*"
"node": "*",
"ender": ">= 0.5.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc