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

@wry/context

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wry/context - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

17

lib/context.esm.js

@@ -122,7 +122,8 @@ var currentContext = null;

var gen = genFn.apply(this, arguments);
var next = bind(gen.next);
var boundNext = bind(gen.next);
var boundThrow = bind(gen["throw"]);
return new Promise(function (resolve, reject) {
function pump(valueToSend) {
function invoke(method, argument) {
try {
var result = next.call(gen, valueToSend);
var result = method.call(gen, argument);
}

@@ -132,11 +133,13 @@ catch (error) {

}
var step = result.done ? resolve : pump;
var next = result.done ? resolve : invokeNext;
if (isPromiseLike(result.value)) {
result.value.then(step, reject);
result.value.then(next, result.done ? reject : invokeThrow);
}
else {
step(result.value);
next(result.value);
}
}
pump();
var invokeNext = function (value) { return invoke(boundNext, value); };
var invokeThrow = function (error) { return invoke(boundThrow, error); };
invokeNext();
});

@@ -143,0 +146,0 @@ };

@@ -126,7 +126,8 @@ 'use strict';

var gen = genFn.apply(this, arguments);
var next = bind(gen.next);
var boundNext = bind(gen.next);
var boundThrow = bind(gen["throw"]);
return new Promise(function (resolve, reject) {
function pump(valueToSend) {
function invoke(method, argument) {
try {
var result = next.call(gen, valueToSend);
var result = method.call(gen, argument);
}

@@ -136,11 +137,13 @@ catch (error) {

}
var step = result.done ? resolve : pump;
var next = result.done ? resolve : invokeNext;
if (isPromiseLike(result.value)) {
result.value.then(step, reject);
result.value.then(next, result.done ? reject : invokeThrow);
}
else {
step(result.value);
next(result.value);
}
}
pump();
var invokeNext = function (value) { return invoke(boundNext, value); };
var invokeThrow = function (error) { return invoke(boundThrow, error); };
invokeNext();
});

@@ -147,0 +150,0 @@ };

{
"name": "@wry/context",
"version": "0.3.1",
"version": "0.3.2",
"author": "Ben Newman <ben@eloper.dev>",

@@ -24,3 +24,3 @@ "description": "Manage contextual information needed by (a)synchronous tasks without explicitly passing objects around",

"build": "npm run clean && npm run tsc && npm run rollup",
"mocha": "node ../../node_modules/.bin/mocha --reporter spec --full-trace lib/tests.js",
"mocha": "../../scripts/test.sh lib/tests.js",
"prepublish": "npm run build",

@@ -32,3 +32,3 @@ "test": "npm run build && npm run mocha"

},
"gitHead": "3a0643ee8dda643e9ac20249442f3ea6ecc1bc8d"
"gitHead": "c619f94dcebed8f4dbb0581997f890c42a2de192"
}

Sorry, the diff of this file is not supported yet

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