utils-copy-error

WebJar for utils-copy-error

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

utils-copy-error
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

utils-copy-error
WebJar for utils-copy-error
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/kgryte/utils-copy-error

Скачать utils-copy-error

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/utils-copy-error/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>utils-copy-error</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/utils-copy-error/
implementation 'org.webjars.npm:utils-copy-error:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/utils-copy-error/
implementation ("org.webjars.npm:utils-copy-error:1.0.1")
'org.webjars.npm:utils-copy-error:jar:1.0.1'
<dependency org="org.webjars.npm" name="utils-copy-error" rev="1.0.1">
  <artifact name="utils-copy-error" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='utils-copy-error', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "utils-copy-error" % "1.0.1"
[org.webjars.npm/utils-copy-error "1.0.1"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.npm : object-keys jar [1.0.9,2)
org.webjars.npm : utils-copy jar [1.1.0,2)

Модули Проекта

Данный проект не имеет модулей.

Copy Error

NPM version Build Status Coverage Status Dependencies

Copy an error object.

Installation

$ npm install utils-copy-error

Usage

var copy = require( 'utils-copy-error' );

copy( error )

Copy an error object.

var err1 = new TypeError( 'beep' );

var err2 = copy( err1 );
// returns <TypeError>

Notes

Examples

var copy = require( 'utils-copy-error' );

var err1;
var err2;

err1 = new Error( 'beep' );
err2 = copy( err1 );

console.log( err1 === err2 );
// returns false

console.log( err1.message === err2.message );
// returns true

err1 = new TypeError( 'bad type' );
err2 = copy (err1 );

console.log( err1 === err2 );
// returns false

console.log( err1.stack === err2.stack );
// returns true

err1 = new RangeError( 'invalid value' );
err2 = copy( err1 );

console.log( err1 === err2 );
// returns false

console.log( err1.name === err2.name );
// returns true

To run the example code from the top-level application directory,

$ node ./examples/index.js

Tests

Unit

This repository uses tape for unit tests. To run the tests, execute the following command in the top-level application directory:

$ make test

All new feature development should have corresponding unit tests to validate correct functionality.

Test Coverage

This repository uses Istanbul as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:

$ make test-cov

Istanbul creates a ./reports/coverage directory. To access an HTML version of the report,

$ make view-cov

Browser Support

This repository uses Testling for browser testing. To run the tests in a (headless) local web browser, execute the following command in the top-level application directory:

$ make test-browsers

To view the tests in a local web browser,

$ make view-browser-tests

License

MIT license.

Copyright

Copyright © 2015. Athan Reines.

Версии библиотеки

Версия
1.0.1