deprecation

WebJar for deprecation

Лицензия

Лицензия

ISC
Группа

Группа

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

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

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

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

2.3.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

deprecation
WebJar for deprecation
Ссылка на сайт

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

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

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

https://github.com/gr2m/deprecation

Скачать deprecation

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

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

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

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

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

deprecation

Log a deprecation message with stack

build

Usage

Browsers

Load deprecation directly from cdn.pika.dev

<script type="module">
  import { Deprecation } from "https://cdn.pika.dev/deprecation/v2";
</script>
Node

Install with npm install deprecation

const { Deprecation } = require("deprecation");
// or: import { Deprecation } from "deprecation";
function foo() {
  bar();
}

function bar() {
  baz();
}

function baz() {
  console.warn(new Deprecation("[my-lib] foo() is deprecated, use bar()"));
}

foo();
// { Deprecation: [my-lib] foo() is deprecated, use bar()
//     at baz (/path/to/file.js:12:15)
//     at bar (/path/to/file.js:8:3)
//     at foo (/path/to/file.js:4:3)

To log a deprecation message only once, you can use the once module.

const Deprecation = require("deprecation");
const once = require("once");

const deprecateFoo = once(console.warn);

function foo() {
  deprecateFoo(new Deprecation("[my-lib] foo() is deprecated, use bar()"));
}

foo();
foo(); // logs nothing

License

ISC

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

Версия
2.3.1
2.0.0
1.0.1