promise-flow
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -10,2 +10,4 @@ 'use strict'; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
require('native-promise-only'); | ||
@@ -15,2 +17,8 @@ | ||
var _internalZipObject2 = _interopRequireDefault(_internalZipObject); | ||
var _internalTryInvoke = require('./internal/try-invoke'); | ||
var _internalTryInvoke2 = _interopRequireDefault(_internalTryInvoke); | ||
function allObject(object) { | ||
@@ -21,3 +29,3 @@ var keys = Object.keys(object); | ||
})).then(function (values) { | ||
return (0, _internalZipObject.zipObject)(keys, values); | ||
return (0, _internalZipObject2['default'])(keys, values); | ||
}); | ||
@@ -39,9 +47,3 @@ } | ||
function parallel(factories) { | ||
try { | ||
return Promise.all(factories.map(function (f) { | ||
return f(); | ||
})); | ||
} catch (err) { | ||
return Promise.reject(err); | ||
} | ||
return Promise.all(factories.map(_internalTryInvoke2['default'])); | ||
} |
@@ -6,5 +6,4 @@ "use strict"; | ||
}); | ||
exports.zipObject = zipObject; | ||
function zipObject(keys, values) { | ||
exports["default"] = function (keys, values) { | ||
var result = {}; | ||
@@ -16,2 +15,4 @@ var l = keys.length; | ||
return result; | ||
} | ||
}; | ||
module.exports = exports["default"]; |
{ | ||
"name": "promise-flow", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Utility module for functions that return promises", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5770
10
57