How to use the es6-error.default function in es6-error

To help you get started, we’ve selected a few es6-error examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github frictionlessdata / tableschema-js / src / errors.js View on Github external
// Weird mocha/karma discrepancy on this import
const ExtendableError = require('es6-error').default || require('es6-error') // eslint-disable-line


// Module API


/**
 * Base class for the all DataPackage/TableSchema errors.
 *
 * If there are more than one error you could get an additional information
 * from the error object:
 *
 * ```javascript
 * try {
 *   // some lib action
 * } catch (error) {
 *   console.log(error) // you have N cast errors (see error.errors)
github arangodb / arangojs / src / util / error.ts View on Github external
let ExtendableError = require("es6-error");
ExtendableError = ExtendableError.default || ExtendableError;
export default ExtendableError as typeof Error;

es6-error

Easily-extendable error for use with ES6 classes

MIT
Latest version published 6 years ago

Package Health Score

67 / 100
Full package analysis

Popular es6-error functions