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

marcosc-async

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marcosc-async - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

11

lib/async.js

@@ -12,6 +12,7 @@ /*jshint -W082 */

// It is called with zero or more arguments...
return function asyncFunction(...args) {
return function asyncFunction() {
const args = Array.from(arguments);
const gen = (function*() {
return (func.constructor.name === 'GeneratorFunction') ?
yield* func.call(self, ...args) : func.call(self, ...args);
yield* func.apply(self, args) : func.apply(self, args);
}());

@@ -23,5 +24,5 @@ try {

}
function step({value, done}) {
const p = Promise.resolve(value); // Normalize thenables
return (done) ? p : p
function step(resultObj) {
const p = Promise.resolve(resultObj.value); // Normalize thenables
return (resultObj.done) ? p : p
.then(result => step(gen.next(result)))

@@ -28,0 +29,0 @@ .catch(error => step(gen.throw(error)));

{
"name": "marcosc-async",
"version": "3.0.3",
"version": "3.0.4",
"description": "Lightweight promise/generator machinery.",

@@ -31,6 +31,7 @@ "main": "lib/async.js",

"chai-as-promised": "^6.0.0",
"jscs": "^3.0.5",
"jshint": "^2.9.2",
"mocha": "^3.0.2"
}
"jscs": "^3.0.7",
"jshint": "^2.9.4",
"mocha": "^3.1.2"
},
"engines": ">=4"
}
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