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

@segment/analytics-generic-utils

Package Overview
Dependencies
Maintainers
284
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@segment/analytics-generic-utils - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

20

dist/cjs/create-deferred/create-deferred.js

@@ -10,5 +10,20 @@ "use strict";

var reject;
var settled = false;
var promise = new Promise(function (_resolve, _reject) {
resolve = _resolve;
reject = _reject;
resolve = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
settled = true;
_resolve.apply(void 0, args);
};
reject = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
settled = true;
_reject.apply(void 0, args);
};
});

@@ -19,2 +34,3 @@ return {

promise: promise,
isSettled: function () { return settled; },
};

@@ -21,0 +37,0 @@ };

@@ -7,5 +7,20 @@ /**

var reject;
var settled = false;
var promise = new Promise(function (_resolve, _reject) {
resolve = _resolve;
reject = _reject;
resolve = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
settled = true;
_resolve.apply(void 0, args);
};
reject = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
settled = true;
_reject.apply(void 0, args);
};
});

@@ -16,4 +31,5 @@ return {

promise: promise,
isSettled: function () { return settled; },
};
};
//# sourceMappingURL=create-deferred.js.map

@@ -8,3 +8,4 @@ /**

promise: Promise<T>;
isSettled: () => boolean;
};
//# sourceMappingURL=create-deferred.d.ts.map

2

package.json
{
"name": "@segment/analytics-generic-utils",
"version": "1.1.1",
"version": "1.2.0",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

@@ -7,6 +7,14 @@ /**

let reject!: (reason: any) => void
let settled = false
const promise = new Promise<T>((_resolve, _reject) => {
resolve = _resolve
reject = _reject
resolve = (...args) => {
settled = true
_resolve(...args)
}
reject = (...args) => {
settled = true
_reject(...args)
}
})
return {

@@ -16,3 +24,4 @@ resolve,

promise,
isSettled: () => settled,
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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