Socket
Socket
Sign inDemoInstall

errlop

Package Overview
Dependencies
0
Maintainers
2
Versions
110
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.0 to 4.2.0-next.1623651235.72177edd240cdd5750addc24f4f3d5e50f9a010e

88

compiled-types/index.d.ts

@@ -1,48 +0,48 @@

declare type PotentialError = Errlop | Error | ErrorCodeHolder | string
declare type PotentialError = Errlop | Error | ErrorCodeHolder | string;
interface ErrorCodeHolder {
exitCode?: string | number
errno?: string | number
code?: string | number
exitCode?: string | number;
errno?: string | number;
code?: string | number;
}
export default class Errlop extends Error {
/** Duck typing as node 4 and intanceof does not work for error extensions */
klass: typeof Errlop
/**
* The parent error if it was provided.
* If a parent was provided, then use that, otherwise use the input's parent, if it exists.
*/
parent?: Errlop | Error | null
/** An array of all the ancestors. From parent, to grand parent, and so on. */
ancestors: Array<Errlop | Error>
/**
* A numeric code to use for the exit status if desired by the consumer.
* It cycles through [input, this, ...ancestors] until it finds the first [exitCode, errno, code] that is valid.
*/
exitCode?: string | number
/**
* The stack for our instance alone, without any parents.
* If the input contained a stack, then use that.
*/
orphanStack: string
/**
* The stack which now contains the accumalated stacks of its ancestors.
* This is used instead of an alias like `fullStack` or the like, to ensure existing code that uses `err.stack` doesn't need to be changed to remain functional.
*/
stack: string
/**
* Syntatic sugar for Errlop class creation.
* Enables `Errlop.create(...args)` to achieve `new Errlop(...args)`
*/
static create(input: PotentialError, parent?: Errlop | Error | null): Errlop
/**
* Create an instance of an error, using a message, as well as an optional parent.
* If the parent is provided, then the `fullStack` property will include its stack too
*/
constructor(input: PotentialError, parent?: Errlop | Error | null)
/** Check whether or not the value is an Errlop instance */
static isErrlop(value: any): boolean
/** Ensure that the value is an Errlop instance */
static ensure(value: any): Errlop
/** Duck typing as node 4 and intanceof does not work for error extensions */
klass: typeof Errlop;
/**
* The parent error if it was provided.
* If a parent was provided, then use that, otherwise use the input's parent, if it exists.
*/
parent?: Errlop | Error | null;
/** An array of all the ancestors. From parent, to grand parent, and so on. */
ancestors: Array<Errlop | Error>;
/**
* A numeric code to use for the exit status if desired by the consumer.
* It cycles through [input, this, ...ancestors] until it finds the first [exitCode, errno, code] that is valid.
*/
exitCode?: string | number;
/**
* The stack for our instance alone, without any parents.
* If the input contained a stack, then use that.
*/
orphanStack: string;
/**
* The stack which now contains the accumalated stacks of its ancestors.
* This is used instead of an alias like `fullStack` or the like, to ensure existing code that uses `err.stack` doesn't need to be changed to remain functional.
*/
stack: string;
/**
* Syntatic sugar for Errlop class creation.
* Enables `Errlop.create(...args)` to achieve `new Errlop(...args)`
*/
static create(input: PotentialError, parent?: Errlop | Error | null): Errlop;
/**
* Create an instance of an error, using a message, as well as an optional parent.
* If the parent is provided, then the `fullStack` property will include its stack too
*/
constructor(input: PotentialError, parent?: Errlop | Error | null);
/** Check whether or not the value is an Errlop instance */
static isErrlop(value: any): boolean;
/** Ensure that the value is an Errlop instance */
static ensure(value: any): Errlop;
}
export {}
//# sourceMappingURL=index.d.ts.map
export {};
//# sourceMappingURL=index.d.ts.map
/** Only accept codes that are numbers, otherwise discard them */
function parseCode(code) {
const number = Number(code)
if (isNaN(number)) return null
return number
const number = Number(code);
if (isNaN(number))
return null;
return number;
}
/** Fetch the code from the value */
function fetchCode(value) {
return (
value &&
(parseCode(value.exitCode) ||
parseCode(value.errno) ||
parseCode(value.code))
)
return (value &&
(parseCode(value.exitCode) ||
parseCode(value.errno) ||
parseCode(value.code)));
}
/** Prevent [a weird error on node version 4](https://github.com/bevry/errlop/issues/1) and below. */
function isValid(value) {
/* eslint no-use-before-define:0 */
return value instanceof Error || Errlop.isErrlop(value)
/* eslint no-use-before-define:0 */
return value instanceof Error || Errlop.isErrlop(value);
}
export default class Errlop extends Error {
/**
* Create an instance of an error, using a message, as well as an optional parent.
* If the parent is provided, then the `fullStack` property will include its stack too
*/
constructor(input, parent = null) {
if (!input) throw new Error('Attempted to create an Errlop without a input')
// Instantiate with the above
super(input.message || input)
// Apply
this.klass = Errlop
this.parent = parent || input.parent
this.ancestors = []
let ancestor = this.parent
while (ancestor) {
this.ancestors.push(ancestor)
ancestor = ancestor.parent
}
// this code must support node 0.8, as well as prevent a weird bug in node v4
// https://travis-ci.org/bevry/editions/jobs/408828147
let exitCode = fetchCode(input)
if (exitCode == null) exitCode = fetchCode(this)
for (
let index = 0;
index < this.ancestors.length && exitCode == null;
++index
) {
const error = this.ancestors[index]
if (isValid(error)) exitCode = fetchCode(error)
}
// Apply
if (exitCode != null) {
this.exitCode = exitCode
}
this.orphanStack = (input.stack || this.stack).toString()
this.stack = this.ancestors.reduce(
(accumulator, error) =>
`${accumulator}\n↳ ${error.orphanStack || error.stack || error}`,
this.orphanStack
)
}
/**
* Syntatic sugar for Errlop class creation.
* Enables `Errlop.create(...args)` to achieve `new Errlop(...args)`
*/
static create(input, parent = null) {
return new this(input, parent)
}
/** Check whether or not the value is an Errlop instance */
static isErrlop(value) {
return value && (value instanceof this || value.klass === this)
}
/** Ensure that the value is an Errlop instance */
static ensure(value) {
return this.isErrlop(value) ? value : this.create(value)
}
/**
* Create an instance of an error, using a message, as well as an optional parent.
* If the parent is provided, then the `fullStack` property will include its stack too
*/
constructor(input, parent = null) {
if (!input)
throw new Error('Attempted to create an Errlop without a input');
// Instantiate with the above
super(input.message || input);
// Apply
this.klass = Errlop;
this.parent = parent || input.parent;
this.ancestors = [];
let ancestor = this.parent;
while (ancestor) {
this.ancestors.push(ancestor);
ancestor = ancestor.parent;
}
// this code must support node 0.8, as well as prevent a weird bug in node v4
// https://travis-ci.org/bevry/editions/jobs/408828147
let exitCode = fetchCode(input);
if (exitCode == null)
exitCode = fetchCode(this);
for (let index = 0; index < this.ancestors.length && exitCode == null; ++index) {
const error = this.ancestors[index];
if (isValid(error))
exitCode = fetchCode(error);
}
// Apply
if (exitCode != null) {
this.exitCode = exitCode;
}
this.orphanStack = (input.stack || this.stack).toString();
this.stack = this.ancestors.reduce((accumulator, error) => `${accumulator}\n↳ ${error.orphanStack || error.stack || error}`, this.orphanStack);
}
/**
* Syntatic sugar for Errlop class creation.
* Enables `Errlop.create(...args)` to achieve `new Errlop(...args)`
*/
static create(input, parent = null) {
return new this(input, parent);
}
/** Check whether or not the value is an Errlop instance */
static isErrlop(value) {
return value && (value instanceof this || value.klass === this);
}
/** Ensure that the value is an Errlop instance */
static ensure(value) {
return this.isErrlop(value) ? value : this.create(value);
}
}

@@ -1,113 +0,95 @@

var __extends =
(this && this.__extends) ||
(function () {
var extendStatics = function (d, b) {
extendStatics =
Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array &&
function (d, b) {
d.__proto__ = b
}) ||
function (d, b) {
for (var p in b)
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]
}
return extendStatics(d, b)
}
return function (d, b) {
extendStatics(d, b)
function __() {
this.constructor = d
}
d.prototype =
b === null ? Object.create(b) : ((__.prototype = b.prototype), new __())
}
})()
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/** Only accept codes that are numbers, otherwise discard them */
function parseCode(code) {
var number = Number(code)
if (isNaN(number)) return null
return number
var number = Number(code);
if (isNaN(number))
return null;
return number;
}
/** Fetch the code from the value */
function fetchCode(value) {
return (
value &&
(parseCode(value.exitCode) ||
parseCode(value.errno) ||
parseCode(value.code))
)
return (value &&
(parseCode(value.exitCode) ||
parseCode(value.errno) ||
parseCode(value.code)));
}
/** Prevent [a weird error on node version 4](https://github.com/bevry/errlop/issues/1) and below. */
function isValid(value) {
/* eslint no-use-before-define:0 */
return value instanceof Error || Errlop.isErrlop(value)
/* eslint no-use-before-define:0 */
return value instanceof Error || Errlop.isErrlop(value);
}
var Errlop = /** @class */ (function (_super) {
__extends(Errlop, _super)
/**
* Create an instance of an error, using a message, as well as an optional parent.
* If the parent is provided, then the `fullStack` property will include its stack too
*/
function Errlop(input, parent) {
if (parent === void 0) {
parent = null
}
var _this = this
if (!input) throw new Error('Attempted to create an Errlop without a input')
// Instantiate with the above
_this = _super.call(this, input.message || input) || this
// Apply
_this.klass = Errlop
_this.parent = parent || input.parent
_this.ancestors = []
var ancestor = _this.parent
while (ancestor) {
_this.ancestors.push(ancestor)
ancestor = ancestor.parent
}
// this code must support node 0.8, as well as prevent a weird bug in node v4
// https://travis-ci.org/bevry/editions/jobs/408828147
var exitCode = fetchCode(input)
if (exitCode == null) exitCode = fetchCode(_this)
for (
var index = 0;
index < _this.ancestors.length && exitCode == null;
++index
) {
var error = _this.ancestors[index]
if (isValid(error)) exitCode = fetchCode(error)
}
// Apply
if (exitCode != null) {
_this.exitCode = exitCode
}
_this.orphanStack = (input.stack || _this.stack).toString()
_this.stack = _this.ancestors.reduce(function (accumulator, error) {
return (
accumulator + '\n\u21B3 ' + (error.orphanStack || error.stack || error)
)
}, _this.orphanStack)
return _this
}
/**
* Syntatic sugar for Errlop class creation.
* Enables `Errlop.create(...args)` to achieve `new Errlop(...args)`
*/
Errlop.create = function (input, parent) {
if (parent === void 0) {
parent = null
}
return new this(input, parent)
}
/** Check whether or not the value is an Errlop instance */
Errlop.isErrlop = function (value) {
return value && (value instanceof this || value.klass === this)
}
/** Ensure that the value is an Errlop instance */
Errlop.ensure = function (value) {
return this.isErrlop(value) ? value : this.create(value)
}
return Errlop
})(Error)
export default Errlop
__extends(Errlop, _super);
/**
* Create an instance of an error, using a message, as well as an optional parent.
* If the parent is provided, then the `fullStack` property will include its stack too
*/
function Errlop(input, parent) {
if (parent === void 0) { parent = null; }
var _this = this;
if (!input)
throw new Error('Attempted to create an Errlop without a input');
// Instantiate with the above
_this = _super.call(this, input.message || input) || this;
// Apply
_this.klass = Errlop;
_this.parent = parent || input.parent;
_this.ancestors = [];
var ancestor = _this.parent;
while (ancestor) {
_this.ancestors.push(ancestor);
ancestor = ancestor.parent;
}
// this code must support node 0.8, as well as prevent a weird bug in node v4
// https://travis-ci.org/bevry/editions/jobs/408828147
var exitCode = fetchCode(input);
if (exitCode == null)
exitCode = fetchCode(_this);
for (var index = 0; index < _this.ancestors.length && exitCode == null; ++index) {
var error = _this.ancestors[index];
if (isValid(error))
exitCode = fetchCode(error);
}
// Apply
if (exitCode != null) {
_this.exitCode = exitCode;
}
_this.orphanStack = (input.stack || _this.stack).toString();
_this.stack = _this.ancestors.reduce(function (accumulator, error) {
return accumulator + "\n\u21B3 " + (error.orphanStack || error.stack || error);
}, _this.orphanStack);
return _this;
}
/**
* Syntatic sugar for Errlop class creation.
* Enables `Errlop.create(...args)` to achieve `new Errlop(...args)`
*/
Errlop.create = function (input, parent) {
if (parent === void 0) { parent = null; }
return new this(input, parent);
};
/** Check whether or not the value is an Errlop instance */
Errlop.isErrlop = function (value) {
return value && (value instanceof this || value.klass === this);
};
/** Ensure that the value is an Errlop instance */
Errlop.ensure = function (value) {
return this.isErrlop(value) ? value : this.create(value);
};
return Errlop;
}(Error));
export default Errlop;

@@ -1,3 +0,1 @@

{
"type": "module"
}
{"type": "module"}

@@ -1,115 +0,97 @@

'use strict'
var __extends =
(this && this.__extends) ||
(function () {
var extendStatics = function (d, b) {
extendStatics =
Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array &&
function (d, b) {
d.__proto__ = b
}) ||
function (d, b) {
for (var p in b)
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]
}
return extendStatics(d, b)
}
return function (d, b) {
extendStatics(d, b)
function __() {
this.constructor = d
}
d.prototype =
b === null ? Object.create(b) : ((__.prototype = b.prototype), new __())
}
})()
Object.defineProperty(exports, '__esModule', { value: true })
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
/** Only accept codes that are numbers, otherwise discard them */
function parseCode(code) {
var number = Number(code)
if (isNaN(number)) return null
return number
var number = Number(code);
if (isNaN(number))
return null;
return number;
}
/** Fetch the code from the value */
function fetchCode(value) {
return (
value &&
(parseCode(value.exitCode) ||
parseCode(value.errno) ||
parseCode(value.code))
)
return (value &&
(parseCode(value.exitCode) ||
parseCode(value.errno) ||
parseCode(value.code)));
}
/** Prevent [a weird error on node version 4](https://github.com/bevry/errlop/issues/1) and below. */
function isValid(value) {
/* eslint no-use-before-define:0 */
return value instanceof Error || Errlop.isErrlop(value)
/* eslint no-use-before-define:0 */
return value instanceof Error || Errlop.isErrlop(value);
}
var Errlop = /** @class */ (function (_super) {
__extends(Errlop, _super)
/**
* Create an instance of an error, using a message, as well as an optional parent.
* If the parent is provided, then the `fullStack` property will include its stack too
*/
function Errlop(input, parent) {
if (parent === void 0) {
parent = null
}
var _this = this
if (!input) throw new Error('Attempted to create an Errlop without a input')
// Instantiate with the above
_this = _super.call(this, input.message || input) || this
// Apply
_this.klass = Errlop
_this.parent = parent || input.parent
_this.ancestors = []
var ancestor = _this.parent
while (ancestor) {
_this.ancestors.push(ancestor)
ancestor = ancestor.parent
}
// this code must support node 0.8, as well as prevent a weird bug in node v4
// https://travis-ci.org/bevry/editions/jobs/408828147
var exitCode = fetchCode(input)
if (exitCode == null) exitCode = fetchCode(_this)
for (
var index = 0;
index < _this.ancestors.length && exitCode == null;
++index
) {
var error = _this.ancestors[index]
if (isValid(error)) exitCode = fetchCode(error)
}
// Apply
if (exitCode != null) {
_this.exitCode = exitCode
}
_this.orphanStack = (input.stack || _this.stack).toString()
_this.stack = _this.ancestors.reduce(function (accumulator, error) {
return (
accumulator + '\n\u21B3 ' + (error.orphanStack || error.stack || error)
)
}, _this.orphanStack)
return _this
}
/**
* Syntatic sugar for Errlop class creation.
* Enables `Errlop.create(...args)` to achieve `new Errlop(...args)`
*/
Errlop.create = function (input, parent) {
if (parent === void 0) {
parent = null
}
return new this(input, parent)
}
/** Check whether or not the value is an Errlop instance */
Errlop.isErrlop = function (value) {
return value && (value instanceof this || value.klass === this)
}
/** Ensure that the value is an Errlop instance */
Errlop.ensure = function (value) {
return this.isErrlop(value) ? value : this.create(value)
}
return Errlop
})(Error)
exports.default = Errlop
__extends(Errlop, _super);
/**
* Create an instance of an error, using a message, as well as an optional parent.
* If the parent is provided, then the `fullStack` property will include its stack too
*/
function Errlop(input, parent) {
if (parent === void 0) { parent = null; }
var _this = this;
if (!input)
throw new Error('Attempted to create an Errlop without a input');
// Instantiate with the above
_this = _super.call(this, input.message || input) || this;
// Apply
_this.klass = Errlop;
_this.parent = parent || input.parent;
_this.ancestors = [];
var ancestor = _this.parent;
while (ancestor) {
_this.ancestors.push(ancestor);
ancestor = ancestor.parent;
}
// this code must support node 0.8, as well as prevent a weird bug in node v4
// https://travis-ci.org/bevry/editions/jobs/408828147
var exitCode = fetchCode(input);
if (exitCode == null)
exitCode = fetchCode(_this);
for (var index = 0; index < _this.ancestors.length && exitCode == null; ++index) {
var error = _this.ancestors[index];
if (isValid(error))
exitCode = fetchCode(error);
}
// Apply
if (exitCode != null) {
_this.exitCode = exitCode;
}
_this.orphanStack = (input.stack || _this.stack).toString();
_this.stack = _this.ancestors.reduce(function (accumulator, error) {
return accumulator + "\n\u21B3 " + (error.orphanStack || error.stack || error);
}, _this.orphanStack);
return _this;
}
/**
* Syntatic sugar for Errlop class creation.
* Enables `Errlop.create(...args)` to achieve `new Errlop(...args)`
*/
Errlop.create = function (input, parent) {
if (parent === void 0) { parent = null; }
return new this(input, parent);
};
/** Check whether or not the value is an Errlop instance */
Errlop.isErrlop = function (value) {
return value && (value instanceof this || value.klass === this);
};
/** Ensure that the value is an Errlop instance */
Errlop.ensure = function (value) {
return this.isErrlop(value) ? value : this.create(value);
};
return Errlop;
}(Error));
exports.default = Errlop;

@@ -1,3 +0,1 @@

{
"type": "commonjs"
}
{"type": "commonjs"}
# History
## v4.2.0 2021 June 14
- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v4.1.0 2020 October 29

@@ -4,0 +8,0 @@

@@ -18,3 +18,3 @@ <!-- LICENSEFILE/ -->

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

@@ -21,0 +21,0 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

{
"name": "errlop",
"version": "4.1.0",
"version": "4.2.0-next.1623651235.72177edd240cdd5750addc24f4f3d5e50f9a010e",
"description": "An extended Error class that envelops a parent error, such that the stack trace contains the causation",

@@ -9,6 +9,2 @@ "homepage": "https://github.com/bevry/errlop",

"browser",
"deno",
"deno-edition",
"deno-entry",
"denoland",
"error",

@@ -31,3 +27,3 @@ "es5",

"list": [
"travisci",
"githubworkflow",
"npmversion",

@@ -49,2 +45,3 @@ "npmdownloads",

"config": {
"githubWorkflow": "bevry",
"githubSponsorsUsername": "balupton",

@@ -59,3 +56,2 @@ "buymeacoffeeUsername": "balupton",

"wishlistURL": "https://bevry.me/wishlist",
"travisTLD": "com",
"githubUsername": "bevry",

@@ -98,3 +94,3 @@ "githubRepository": "errlop",

{
"description": "TypeScript compiled against ES2019 for web browsers with Import for modules",
"description": "TypeScript compiled against ES2020 for web browsers with Import for modules",
"directory": "edition-browsers",

@@ -123,3 +119,3 @@ "entry": "index.js",

"engines": {
"node": "4 || 6 || 8 || 10 || 12 || 14 || 15",
"node": "4 || 6 || 8 || 10 || 12 || 14",
"browsers": false

@@ -139,19 +135,5 @@ }

"engines": {
"node": "12 || 14 || 15",
"node": "12 || 14",
"browsers": false
}
},
{
"description": "TypeScript source code made to be compatible with Deno",
"directory": "edition-deno",
"entry": "index.ts",
"tags": [
"typescript",
"import",
"deno"
],
"engines": {
"deno": true,
"browsers": true
}
}

@@ -171,23 +153,22 @@ ],

},
"deno": "edition-deno/index.ts",
"browser": "edition-browsers/index.js",
"module": "edition-browsers/index.js",
"devDependencies": {
"@bevry/update-contributors": "^1.17.0",
"@typescript-eslint/eslint-plugin": "^4.6.0",
"@typescript-eslint/parser": "^4.6.0",
"@bevry/update-contributors": "^1.18.0",
"@typescript-eslint/eslint-plugin": "^4.26.1",
"@typescript-eslint/parser": "^4.26.1",
"assert-helpers": "^8.1.0",
"eslint": "^7.12.1",
"eslint-config-bevry": "^3.22.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint": "^7.28.0",
"eslint-config-bevry": "^3.23.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"kava": "3.2.0",
"make-deno-edition": "^1.2.0",
"prettier": "^2.1.2",
"projectz": "^2.16.0",
"surge": "^0.21.6",
"typedoc": "^0.19.2",
"typescript": "^4.0.5",
"valid-directory": "^3.4.0",
"valid-module": "^1.14.0"
"prettier": "^2.3.1",
"projectz": "^2.18.0",
"surge": "^0.23.0",
"typedoc": "^0.20.36",
"typescript": "4.2.4",
"valid-directory": "^3.6.0",
"valid-module": "^1.15.0"
},

@@ -198,3 +179,3 @@ "scripts": {

"our:compile:deno": "make-deno-edition --attempt",
"our:compile:edition-browsers": "tsc --module ESNext --target ES2019 --outDir ./edition-browsers --project tsconfig.json && ( test ! -d edition-browsers/source || ( mv edition-browsers/source edition-temp && rm -Rf edition-browsers && mv edition-temp edition-browsers ) )",
"our:compile:edition-browsers": "tsc --module ESNext --target ES2020 --outDir ./edition-browsers --project tsconfig.json && ( test ! -d edition-browsers/source || ( mv edition-browsers/source edition-temp && rm -Rf edition-browsers && mv edition-temp edition-browsers ) )",
"our:compile:edition-es5": "tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -Rf edition-es5 && mv edition-temp edition-es5 ) ) && echo '{\"type\": \"commonjs\"}' > edition-es5/package.json",

@@ -207,3 +188,3 @@ "our:compile:edition-es5-esm": "tsc --module ESNext --target ES5 --outDir ./edition-es5-esm --project tsconfig.json && ( test ! -d edition-es5-esm/source || ( mv edition-es5-esm/source edition-temp && rm -Rf edition-es5-esm && mv edition-temp edition-es5-esm ) ) && echo '{\"type\": \"module\"}' > edition-es5-esm/package.json",

"our:meta:docs": "npm run our:meta:docs:typedoc",
"our:meta:docs:typedoc": "rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source",
"our:meta:docs:typedoc": "rm -Rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source",
"our:meta:projectz": "projectz compile",

@@ -210,0 +191,0 @@ "our:release": "npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push",

@@ -10,3 +10,3 @@ <!-- TITLE/ -->

<span class="badge-travisci"><a href="http://travis-ci.com/bevry/errlop" title="Check this project's build status on TravisCI"><img src="https://img.shields.io/travis/com/bevry/errlop/master.svg" alt="Travis CI Build Status" /></a></span>
<span class="badge-githubworkflow"><a href="https://github.com/bevry/errlop/actions?query=workflow%3Abevry" title="View the status of this project's GitHub Workflow: bevry"><img src="https://github.com/bevry/errlop/workflows/bevry/badge.svg" alt="Status of the GitHub Workflow: bevry" /></a></span>
<span class="badge-npmversion"><a href="https://npmjs.org/package/errlop" title="View this project on NPM"><img src="https://img.shields.io/npm/v/errlop.svg" alt="NPM version" /></a></span>

@@ -107,8 +107,2 @@ <span class="badge-npmdownloads"><a href="https://npmjs.org/package/errlop" title="View this project on NPM"><img src="https://img.shields.io/npm/dm/errlop.svg" alt="NPM downloads" /></a></span>

<a href="https://deno.land" title="Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js"><h3>Deno</h3></a>
``` typescript
import pkg from 'https://unpkg.com/errlop@^4.1.0/edition-deno/index.ts'
```
<a href="https://www.skypack.dev" title="Skypack is a JavaScript Delivery Network for modern web apps"><h3>Skypack</h3></a>

@@ -118,3 +112,3 @@

<script type="module">
import pkg from '//cdn.skypack.dev/errlop@^4.1.0'
import pkg from '//cdn.skypack.dev/errlop@^4.2.0'
</script>

@@ -127,3 +121,3 @@ ```

<script type="module">
import pkg from '//unpkg.com/errlop@^4.1.0'
import pkg from '//unpkg.com/errlop@^4.2.0'
</script>

@@ -136,3 +130,3 @@ ```

<script type="module">
import pkg from '//dev.jspm.io/errlop@4.1.0'
import pkg from '//dev.jspm.io/errlop@4.2.0'
</script>

@@ -146,7 +140,6 @@ ```

<ul><li><code>errlop/source/index.ts</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> source code with <a href="https://babeljs.io/docs/learn-es2015/#modules" title="ECMAScript Modules">Import</a> for modules</li>
<li><code>errlop/edition-browsers/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against <a href="https://en.wikipedia.org/wiki/ECMAScript#10th_Edition_-_ECMAScript_2019" title="ECMAScript ES2019">ES2019</a> for web browsers with <a href="https://babeljs.io/docs/learn-es2015/#modules" title="ECMAScript Modules">Import</a> for modules</li>
<li><code>errlop/edition-browsers/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against <a href="https://en.wikipedia.org/wiki/ECMAScript#11th_Edition_–_ECMAScript_2020" title="ECMAScript ES2020">ES2020</a> for web browsers with <a href="https://babeljs.io/docs/learn-es2015/#modules" title="ECMAScript Modules">Import</a> for modules</li>
<li><code>errlop</code> aliases <code>errlop/edition-es5/index.js</code></li>
<li><code>errlop/edition-es5/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against ES5 for <a href="https://nodejs.org" title="Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine">Node.js</a> with <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a> for modules</li>
<li><code>errlop/edition-es5-esm/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against ES5 for <a href="https://nodejs.org" title="Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine">Node.js</a> with <a href="https://babeljs.io/docs/learn-es2015/#modules" title="ECMAScript Modules">Import</a> for modules</li>
<li><code>errlop/edition-deno/index.ts</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> source code made to be compatible with <a href="https://deno.land" title="Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js">Deno</a></li></ul>
<li><code>errlop/edition-es5-esm/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against ES5 for <a href="https://nodejs.org" title="Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine">Node.js</a> with <a href="https://babeljs.io/docs/learn-es2015/#modules" title="ECMAScript Modules">Import</a> for modules</li></ul>

@@ -153,0 +146,0 @@ <!-- /INSTALL -->

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