New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

awync

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awync - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

34

index.js

@@ -13,2 +13,5 @@ /**

if(typeof obj === 'function'){
if(isGeneratorFunc(obj)){
return obj;
}
return awaiter({obj}, true).obj;

@@ -29,2 +32,7 @@ }

if(typeof v === 'function'){
if(isGeneratorFunc(v)){
return v;
}
return function *() {

@@ -46,2 +54,3 @@ var args = Array.prototype.slice.call(arguments);

return awaiter(v, true);

@@ -69,8 +78,14 @@ }

var rootObj = genFunc();
var timeout = setTimeout(() =>{}, 0x7FFFFFFF);
function exit(result) {
clearTimeout(timeout);
if(result instanceof Error){
setTimeout(err => rootObj.throw(err), 0, result);
}
}
return (function doRun(genObj, cb) {
function next(prev) {
if(prev instanceof Error){
return setTimeout(function (err) {
rootObj.throw(err);
}, 0, prev);
return exit(prev);
}

@@ -81,8 +96,13 @@ var yielded;

}catch (err){
return setTimeout(function (err) {
rootObj.throw(err);
}, 0, err);
return exit(err);
}
if(yielded.done){
if(cb) cb(prev);
if(cb) {
return cb(prev);
}
if(genObj === rootObj){
return exit(prev);
}
return;

@@ -89,0 +109,0 @@ }

{
"name": "awync",
"version": "1.1.0",
"version": "1.1.1",
"description": "Lightweight async / await library for NodeJs (and/or) Browsers",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -273,2 +273,4 @@ # Awync

- 1.1.1
- Bug fix: Awaiter should only wrap non generator functions
- 1.1.0

@@ -275,0 +277,0 @@ - Added Iterator and Callback support

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