es-to-primitive

WebJar for es-to-primitive

Лицензия

Лицензия

MIT
Группа

Группа

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

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

es-to-primitive
Последняя версия

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

1.2.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

es-to-primitive
WebJar for es-to-primitive
Ссылка на сайт

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

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

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

https://github.com/ljharb/es-to-primitive

Скачать es-to-primitive

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

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

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.webjars.npm : is-callable jar [1.1.4,2)
org.webjars.npm : is-date-object jar [1.0.1,2)
org.webjars.npm : is-symbol jar [1.0.2,2)

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

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

es-to-primitive Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions. When different versions of the spec conflict, the default export will be the latest version of the abstract operation. Alternative versions will also be available under an es5/es2015 exported property if you require a specific version.

Example

var toPrimitive = require('es-to-primitive');
var assert = require('assert');

assert(toPrimitive(function () {}) === String(function () {}));

var date = new Date();
assert(toPrimitive(date) === String(date));

assert(toPrimitive({ valueOf: function () { return 3; } }) === 3);

assert(toPrimitive(['a', 'b', 3]) === String(['a', 'b', 3]));

var sym = Symbol();
assert(toPrimitive(Object(sym)) === sym);

Tests

Simply clone the repo, npm install, and run npm test

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

Версия
1.2.1
1.2.0
1.1.1
1.0.0