Socket
Socket
Sign inDemoInstall

z-core

Package Overview
Dependencies
1
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.1 to 0.5.0

44

lib/index.js
// Generated by CoffeeScript 1.7.1
(function() {
var init, isArray, isPrimitive, keys, makeZ, object, objectCreate, overrides, pairs, proc, resolveAll, resolveCompletely, tools, values,
var Promise, init, isArray, isPrimitive, keys, makeZ, object, objectCreate, overrides, pairs, proc, resolveAll, resolveCompletely, tools, values,
__slice = [].slice;

@@ -8,2 +8,4 @@

Promise = require('es6-promise').Promise;
pairs = tools.pairs, keys = tools.keys, values = tools.values, object = tools.object, resolveAll = tools.resolveAll, isPrimitive = tools.isPrimitive, isArray = tools.isArray, objectCreate = tools.objectCreate, proc = tools.proc;

@@ -80,2 +82,42 @@

});
Z.bindSync = function(func, context) {
return function() {
var unresolvedArgs;
unresolvedArgs = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return Z(unresolvedArgs).then((function(_this) {
return function(args) {
return func.apply(context != null ? context : _this, args);
};
})(this));
};
};
Z.bindAsync = function(func, context) {
return function() {
var ctx, unresolvedArgs;
unresolvedArgs = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
ctx = context != null ? context : this;
return Z(unresolvedArgs).then(function(args) {
return new Promise(function(resolve, reject) {
var ex;
args.push(function() {
var err, result;
err = arguments[0], result = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
if (err != null) {
return reject(err);
} else if (result.length === 1) {
return resolve(result[0]);
} else {
return resolve(result);
}
});
try {
return func.apply(ctx, args);
} catch (_error) {
ex = _error;
return reject(ex);
}
});
});
};
};
return Z;

@@ -82,0 +124,0 @@ };

2

package.json

@@ -12,3 +12,3 @@ {

],
"version": "0.4.1",
"version": "0.5.0",
"author": "Jakob Mattsson <jakob.mattsson@gmail.com> (jakobmattsson.se)",

@@ -15,0 +15,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc