Socket
Socket
Sign inDemoInstall

heimdalljs

Package Overview
Dependencies
1
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.3 to 0.2.4

6

CHANGELOG.md
# master
# 0.2.4
* don't include tests in published package
# 0.2.3

@@ -11,4 +15,2 @@

DO NOT USE THIS VERSION. publishing error.
# 0.2.1

@@ -15,0 +17,0 @@

@@ -374,5 +374,5 @@ function indexOf(callbacks, callback) {

function tryThen(then, value, fulfillmentHandler, rejectionHandler) {
function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
try {
then.call(value, fulfillmentHandler, rejectionHandler);
then$$1.call(value, fulfillmentHandler, rejectionHandler);
} catch(e) {

@@ -383,6 +383,6 @@ return e;

function handleForeignThenable(promise, thenable, then) {
function handleForeignThenable(promise, thenable, then$$1) {
config.async(function(promise) {
var sealed = false;
var error = tryThen(then, thenable, function(value) {
var error = tryThen(then$$1, thenable, function(value) {
if (sealed) { return; }

@@ -428,14 +428,14 @@ sealed = true;

function handleMaybeThenable(promise, maybeThenable, then$$) {
function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor &&
then$$ === then &&
then$$1 === then &&
constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
if (then$$ === GET_THEN_ERROR) {
if (then$$1 === GET_THEN_ERROR) {
reject(promise, GET_THEN_ERROR.error);
} else if (then$$ === undefined) {
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$)) {
handleForeignThenable(promise, maybeThenable, then$$);
} else if (isFunction(then$$1)) {
handleForeignThenable(promise, maybeThenable, then$$1);
} else {

@@ -690,12 +690,12 @@ fulfill(promise, maybeThenable);

var c = this._instanceConstructor;
var resolve = c.resolve;
var resolve$$1 = c.resolve;
if (resolve === resolve$1) {
var then$$ = getThen(entry);
if (resolve$$1 === resolve$1) {
var then$$1 = getThen(entry);
if (then$$ === then &&
if (then$$1 === then &&
entry._state !== PENDING) {
entry._onError = null;
this._settledAt(entry._state, i, entry._result);
} else if (typeof then$$ !== 'function') {
} else if (typeof then$$1 !== 'function') {
this._remaining--;

@@ -705,9 +705,9 @@ this._result[i] = this._makeResult(FULFILLED, i, entry);

var promise = new c(noop);
handleMaybeThenable(promise, entry, then$$);
handleMaybeThenable(promise, entry, then$$1);
this._willSettleAt(promise, i);
} else {
this._willSettleAt(new c(function(resolve) { resolve(entry); }), i);
this._willSettleAt(new c(function(resolve$$1) { resolve$$1(entry); }), i);
}
} else {
this._willSettleAt(resolve(entry), i);
this._willSettleAt(resolve$$1(entry), i);
}

@@ -1379,9 +1379,2 @@ };

function Result() {
this.value = undefined;
}
var ERROR = new Result();
var GET_THEN_ERROR$1 = new Result();
function AllSettled(Constructor, entries, label) {

@@ -1453,2 +1446,43 @@ this._superConstructor(Constructor, entries, false /* don't abort on reject */, label);

/**
`RSVP.rethrow` will rethrow an error on the next turn of the JavaScript event
loop in order to aid debugging.
Promises A+ specifies that any exceptions that occur with a promise must be
caught by the promises implementation and bubbled to the last handler. For
this reason, it is recommended that you always specify a second rejection
handler function to `then`. However, `RSVP.rethrow` will throw the exception
outside of the promise, so it bubbles up to your console if in the browser,
or domain/cause uncaught exception in Node. `rethrow` will also throw the
error again so the error can be handled by the promise per the spec.
```javascript
function throws(){
throw new Error('Whoops!');
}
var promise = new RSVP.Promise(function(resolve, reject){
throws();
});
promise.catch(RSVP.rethrow).then(function(){
// Code here doesn't run because the promise became rejected due to an
// error!
}, function (err){
// handle the error here
});
```
The 'Whoops' error will be thrown on the next turn of the event loop
and you can watch for it in your console. You can also handle it using a
rejection handler given to `.then` or `.catch` on the returned promise.
@method rethrow
@static
@for RSVP
@param {Error} reason reason the promise became rejected.
@throws Error
@static
*/
var len = 0;

@@ -1589,5 +1623,15 @@ var vertxNext;

} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var classCallCheck = function (instance, Constructor) {

@@ -1843,3 +1887,3 @@ if (!(instance instanceof Constructor)) {

if ((typeof performance === 'undefined' ? 'undefined' : _typeof(performance)) === 'object' && typeof performance.now === 'function') {
now$1 = function now() {
now$1 = function now$1() {
return performance.now.call(performance);

@@ -1954,4 +1998,4 @@ };

// to support those more advanced scenarios.
return new Promise$1(function (resolve) {
return resolve(callback.call(context, cookie._node.stats.own));
return new Promise$1(function (resolve$$1) {
return resolve$$1(callback.call(context, cookie._node.stats.own));
}).finally(function () {

@@ -2066,2 +2110,2 @@ return cookie.stop();

module.exports = index;
module.exports = index;

@@ -374,5 +374,5 @@ function indexOf(callbacks, callback) {

function tryThen(then, value, fulfillmentHandler, rejectionHandler) {
function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
try {
then.call(value, fulfillmentHandler, rejectionHandler);
then$$1.call(value, fulfillmentHandler, rejectionHandler);
} catch(e) {

@@ -383,6 +383,6 @@ return e;

function handleForeignThenable(promise, thenable, then) {
function handleForeignThenable(promise, thenable, then$$1) {
config.async(function(promise) {
var sealed = false;
var error = tryThen(then, thenable, function(value) {
var error = tryThen(then$$1, thenable, function(value) {
if (sealed) { return; }

@@ -428,14 +428,14 @@ sealed = true;

function handleMaybeThenable(promise, maybeThenable, then$$) {
function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor &&
then$$ === then &&
then$$1 === then &&
constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
if (then$$ === GET_THEN_ERROR) {
if (then$$1 === GET_THEN_ERROR) {
reject(promise, GET_THEN_ERROR.error);
} else if (then$$ === undefined) {
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$)) {
handleForeignThenable(promise, maybeThenable, then$$);
} else if (isFunction(then$$1)) {
handleForeignThenable(promise, maybeThenable, then$$1);
} else {

@@ -690,12 +690,12 @@ fulfill(promise, maybeThenable);

var c = this._instanceConstructor;
var resolve = c.resolve;
var resolve$$1 = c.resolve;
if (resolve === resolve$1) {
var then$$ = getThen(entry);
if (resolve$$1 === resolve$1) {
var then$$1 = getThen(entry);
if (then$$ === then &&
if (then$$1 === then &&
entry._state !== PENDING) {
entry._onError = null;
this._settledAt(entry._state, i, entry._result);
} else if (typeof then$$ !== 'function') {
} else if (typeof then$$1 !== 'function') {
this._remaining--;

@@ -705,9 +705,9 @@ this._result[i] = this._makeResult(FULFILLED, i, entry);

var promise = new c(noop);
handleMaybeThenable(promise, entry, then$$);
handleMaybeThenable(promise, entry, then$$1);
this._willSettleAt(promise, i);
} else {
this._willSettleAt(new c(function(resolve) { resolve(entry); }), i);
this._willSettleAt(new c(function(resolve$$1) { resolve$$1(entry); }), i);
}
} else {
this._willSettleAt(resolve(entry), i);
this._willSettleAt(resolve$$1(entry), i);
}

@@ -1379,9 +1379,2 @@ };

function Result() {
this.value = undefined;
}
var ERROR = new Result();
var GET_THEN_ERROR$1 = new Result();
function AllSettled(Constructor, entries, label) {

@@ -1453,2 +1446,43 @@ this._superConstructor(Constructor, entries, false /* don't abort on reject */, label);

/**
`RSVP.rethrow` will rethrow an error on the next turn of the JavaScript event
loop in order to aid debugging.
Promises A+ specifies that any exceptions that occur with a promise must be
caught by the promises implementation and bubbled to the last handler. For
this reason, it is recommended that you always specify a second rejection
handler function to `then`. However, `RSVP.rethrow` will throw the exception
outside of the promise, so it bubbles up to your console if in the browser,
or domain/cause uncaught exception in Node. `rethrow` will also throw the
error again so the error can be handled by the promise per the spec.
```javascript
function throws(){
throw new Error('Whoops!');
}
var promise = new RSVP.Promise(function(resolve, reject){
throws();
});
promise.catch(RSVP.rethrow).then(function(){
// Code here doesn't run because the promise became rejected due to an
// error!
}, function (err){
// handle the error here
});
```
The 'Whoops' error will be thrown on the next turn of the event loop
and you can watch for it in your console. You can also handle it using a
rejection handler given to `.then` or `.catch` on the returned promise.
@method rethrow
@static
@for RSVP
@param {Error} reason reason the promise became rejected.
@throws Error
@static
*/
var len = 0;

@@ -1589,5 +1623,15 @@ var vertxNext;

} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var classCallCheck = function (instance, Constructor) {

@@ -1843,3 +1887,3 @@ if (!(instance instanceof Constructor)) {

if ((typeof performance === 'undefined' ? 'undefined' : _typeof(performance)) === 'object' && typeof performance.now === 'function') {
now$1 = function now() {
now$1 = function now$1() {
return performance.now.call(performance);

@@ -1954,4 +1998,4 @@ };

// to support those more advanced scenarios.
return new Promise$1(function (resolve) {
return resolve(callback.call(context, cookie._node.stats.own));
return new Promise$1(function (resolve$$1) {
return resolve$$1(callback.call(context, cookie._node.stats.own));
}).finally(function () {

@@ -2066,2 +2110,2 @@ return cookie.stop();

export default index;
export default index;

@@ -375,5 +375,5 @@ var heimdall = (function () {

function tryThen(then, value, fulfillmentHandler, rejectionHandler) {
function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
try {
then.call(value, fulfillmentHandler, rejectionHandler);
then$$1.call(value, fulfillmentHandler, rejectionHandler);
} catch(e) {

@@ -384,6 +384,6 @@ return e;

function handleForeignThenable(promise, thenable, then) {
function handleForeignThenable(promise, thenable, then$$1) {
config.async(function(promise) {
var sealed = false;
var error = tryThen(then, thenable, function(value) {
var error = tryThen(then$$1, thenable, function(value) {
if (sealed) { return; }

@@ -429,14 +429,14 @@ sealed = true;

function handleMaybeThenable(promise, maybeThenable, then$$) {
function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor &&
then$$ === then &&
then$$1 === then &&
constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
if (then$$ === GET_THEN_ERROR) {
if (then$$1 === GET_THEN_ERROR) {
reject(promise, GET_THEN_ERROR.error);
} else if (then$$ === undefined) {
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$)) {
handleForeignThenable(promise, maybeThenable, then$$);
} else if (isFunction(then$$1)) {
handleForeignThenable(promise, maybeThenable, then$$1);
} else {

@@ -691,12 +691,12 @@ fulfill(promise, maybeThenable);

var c = this._instanceConstructor;
var resolve = c.resolve;
var resolve$$1 = c.resolve;
if (resolve === resolve$1) {
var then$$ = getThen(entry);
if (resolve$$1 === resolve$1) {
var then$$1 = getThen(entry);
if (then$$ === then &&
if (then$$1 === then &&
entry._state !== PENDING) {
entry._onError = null;
this._settledAt(entry._state, i, entry._result);
} else if (typeof then$$ !== 'function') {
} else if (typeof then$$1 !== 'function') {
this._remaining--;

@@ -706,9 +706,9 @@ this._result[i] = this._makeResult(FULFILLED, i, entry);

var promise = new c(noop);
handleMaybeThenable(promise, entry, then$$);
handleMaybeThenable(promise, entry, then$$1);
this._willSettleAt(promise, i);
} else {
this._willSettleAt(new c(function(resolve) { resolve(entry); }), i);
this._willSettleAt(new c(function(resolve$$1) { resolve$$1(entry); }), i);
}
} else {
this._willSettleAt(resolve(entry), i);
this._willSettleAt(resolve$$1(entry), i);
}

@@ -1380,9 +1380,2 @@ };

function Result() {
this.value = undefined;
}
var ERROR = new Result();
var GET_THEN_ERROR$1 = new Result();
function AllSettled(Constructor, entries, label) {

@@ -1454,2 +1447,43 @@ this._superConstructor(Constructor, entries, false /* don't abort on reject */, label);

/**
`RSVP.rethrow` will rethrow an error on the next turn of the JavaScript event
loop in order to aid debugging.
Promises A+ specifies that any exceptions that occur with a promise must be
caught by the promises implementation and bubbled to the last handler. For
this reason, it is recommended that you always specify a second rejection
handler function to `then`. However, `RSVP.rethrow` will throw the exception
outside of the promise, so it bubbles up to your console if in the browser,
or domain/cause uncaught exception in Node. `rethrow` will also throw the
error again so the error can be handled by the promise per the spec.
```javascript
function throws(){
throw new Error('Whoops!');
}
var promise = new RSVP.Promise(function(resolve, reject){
throws();
});
promise.catch(RSVP.rethrow).then(function(){
// Code here doesn't run because the promise became rejected due to an
// error!
}, function (err){
// handle the error here
});
```
The 'Whoops' error will be thrown on the next turn of the event loop
and you can watch for it in your console. You can also handle it using a
rejection handler given to `.then` or `.catch` on the returned promise.
@method rethrow
@static
@for RSVP
@param {Error} reason reason the promise became rejected.
@throws Error
@static
*/
var len = 0;

@@ -1590,5 +1624,15 @@ var vertxNext;

} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var classCallCheck = function (instance, Constructor) {

@@ -1844,3 +1888,3 @@ if (!(instance instanceof Constructor)) {

if ((typeof performance === 'undefined' ? 'undefined' : _typeof(performance)) === 'object' && typeof performance.now === 'function') {
now$1 = function now() {
now$1 = function now$1() {
return performance.now.call(performance);

@@ -1955,4 +1999,4 @@ };

// to support those more advanced scenarios.
return new Promise$1(function (resolve) {
return resolve(callback.call(context, cookie._node.stats.own));
return new Promise$1(function (resolve$$1) {
return resolve$$1(callback.call(context, cookie._node.stats.own));
}).finally(function () {

@@ -2072,2 +2116,2 @@ return cookie.stop();

}());
}());

@@ -380,5 +380,5 @@ (function (global, factory) {

function tryThen(then, value, fulfillmentHandler, rejectionHandler) {
function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
try {
then.call(value, fulfillmentHandler, rejectionHandler);
then$$1.call(value, fulfillmentHandler, rejectionHandler);
} catch(e) {

@@ -389,6 +389,6 @@ return e;

function handleForeignThenable(promise, thenable, then) {
function handleForeignThenable(promise, thenable, then$$1) {
config.async(function(promise) {
var sealed = false;
var error = tryThen(then, thenable, function(value) {
var error = tryThen(then$$1, thenable, function(value) {
if (sealed) { return; }

@@ -434,14 +434,14 @@ sealed = true;

function handleMaybeThenable(promise, maybeThenable, then$$) {
function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor &&
then$$ === then &&
then$$1 === then &&
constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
if (then$$ === GET_THEN_ERROR) {
if (then$$1 === GET_THEN_ERROR) {
reject(promise, GET_THEN_ERROR.error);
} else if (then$$ === undefined) {
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$)) {
handleForeignThenable(promise, maybeThenable, then$$);
} else if (isFunction(then$$1)) {
handleForeignThenable(promise, maybeThenable, then$$1);
} else {

@@ -696,12 +696,12 @@ fulfill(promise, maybeThenable);

var c = this._instanceConstructor;
var resolve = c.resolve;
var resolve$$1 = c.resolve;
if (resolve === resolve$1) {
var then$$ = getThen(entry);
if (resolve$$1 === resolve$1) {
var then$$1 = getThen(entry);
if (then$$ === then &&
if (then$$1 === then &&
entry._state !== PENDING) {
entry._onError = null;
this._settledAt(entry._state, i, entry._result);
} else if (typeof then$$ !== 'function') {
} else if (typeof then$$1 !== 'function') {
this._remaining--;

@@ -711,9 +711,9 @@ this._result[i] = this._makeResult(FULFILLED, i, entry);

var promise = new c(noop);
handleMaybeThenable(promise, entry, then$$);
handleMaybeThenable(promise, entry, then$$1);
this._willSettleAt(promise, i);
} else {
this._willSettleAt(new c(function(resolve) { resolve(entry); }), i);
this._willSettleAt(new c(function(resolve$$1) { resolve$$1(entry); }), i);
}
} else {
this._willSettleAt(resolve(entry), i);
this._willSettleAt(resolve$$1(entry), i);
}

@@ -1385,9 +1385,2 @@ };

function Result() {
this.value = undefined;
}
var ERROR = new Result();
var GET_THEN_ERROR$1 = new Result();
function AllSettled(Constructor, entries, label) {

@@ -1459,2 +1452,43 @@ this._superConstructor(Constructor, entries, false /* don't abort on reject */, label);

/**
`RSVP.rethrow` will rethrow an error on the next turn of the JavaScript event
loop in order to aid debugging.
Promises A+ specifies that any exceptions that occur with a promise must be
caught by the promises implementation and bubbled to the last handler. For
this reason, it is recommended that you always specify a second rejection
handler function to `then`. However, `RSVP.rethrow` will throw the exception
outside of the promise, so it bubbles up to your console if in the browser,
or domain/cause uncaught exception in Node. `rethrow` will also throw the
error again so the error can be handled by the promise per the spec.
```javascript
function throws(){
throw new Error('Whoops!');
}
var promise = new RSVP.Promise(function(resolve, reject){
throws();
});
promise.catch(RSVP.rethrow).then(function(){
// Code here doesn't run because the promise became rejected due to an
// error!
}, function (err){
// handle the error here
});
```
The 'Whoops' error will be thrown on the next turn of the event loop
and you can watch for it in your console. You can also handle it using a
rejection handler given to `.then` or `.catch` on the returned promise.
@method rethrow
@static
@for RSVP
@param {Error} reason reason the promise became rejected.
@throws Error
@static
*/
var len = 0;

@@ -1595,5 +1629,15 @@ var vertxNext;

} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var classCallCheck = function (instance, Constructor) {

@@ -1849,3 +1893,3 @@ if (!(instance instanceof Constructor)) {

if ((typeof performance === 'undefined' ? 'undefined' : _typeof(performance)) === 'object' && typeof performance.now === 'function') {
now$1 = function now() {
now$1 = function now$1() {
return performance.now.call(performance);

@@ -1960,4 +2004,4 @@ };

// to support those more advanced scenarios.
return new Promise$1(function (resolve) {
return resolve(callback.call(context, cookie._node.stats.own));
return new Promise$1(function (resolve$$1) {
return resolve$$1(callback.call(context, cookie._node.stats.own));
}).finally(function () {

@@ -2077,2 +2121,2 @@ return cookie.stop();

})));
})));
{
"name": "heimdalljs",
"version": "0.2.3",
"version": "0.2.4",
"description": "Structured instrumentation library",

@@ -13,3 +13,4 @@ "main": "dist/heimdalljs.cjs.js",

"test": "npm run build:node && npm run build:test && mocha dist/tests/bundle.cjs",
"test:debug": "mocha --no-timeouts debug dist/tests/bundle.cjs"
"test:debug": "mocha --no-timeouts debug dist/tests/bundle.cjs",
"prepublish": "npm run build"
},

@@ -30,8 +31,12 @@ "repository": {

"files": [
"dist",
"dist/heimdalljs.cjs.js",
"dist/heimdalljs.es.js",
"dist/heimdalljs.iife.js",
"dist/heimdalljs.umd.js",
"heimdall.js"
],
"devDependencies": {
"babel-preset-es2015": "^6.13.0",
"babel-preset-es2015-rollup": "^1.1.1",
"babel-plugin-external-helpers": "^6.18.0",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-es2015": "^6.18.0",
"broccoli": "^0.16.9",

@@ -43,7 +48,7 @@ "chai": "^3.2.0",

"mocha-jshint": "~2.2.3",
"rollup": "^0.34.1",
"rollup-plugin-babel": "^2.6.1",
"rollup-plugin-buble": "^0.12.1",
"rollup-plugin-commonjs": "^3.3.1",
"rollup-plugin-node-resolve": "^1.7.1"
"rollup": "^0.37.0",
"rollup-plugin-babel": "^2.7.0",
"rollup-plugin-commonjs": "^5.0.5",
"rollup-plugin-json": "^2.0.2",
"rollup-plugin-node-resolve": "^2.0.0"
},

@@ -50,0 +55,0 @@ "dependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc