which-collection

WebJar for which-collection

Лицензия

Лицензия

MIT
Группа

Группа

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

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

which-collection
Последняя версия

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

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

which-collection
WebJar for which-collection
Ссылка на сайт

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

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

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

https://github.com/inspect-js/which-collection

Скачать which-collection

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

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

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
org.webjars.npm : is-map jar [2.0.1,3)
org.webjars.npm : is-set jar [2.0.1,3)
org.webjars.npm : is-weakmap jar [2.0.1,3)
org.webjars.npm : is-weakset jar [2.0.1,3)

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

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

which-collection Version Badge

dependency status dev dependency status License Downloads

npm badge

Which kind of Collection (Map, Set, WeakMap, WeakSet) is this JavaScript value? Works cross-realm, without instanceof, and despite Symbol.toStringTag.

Example

var whichCollection = require('which-collection');
var assert = require('assert');

assert.equal(false, whichCollection(undefined));
assert.equal(false, whichCollection(null));
assert.equal(false, whichCollection(false));
assert.equal(false, whichCollection(true));
assert.equal(false, whichCollection([]));
assert.equal(false, whichCollection({}));
assert.equal(false, whichCollection(/a/g));
assert.equal(false, whichCollection(new RegExp('a', 'g')));
assert.equal(false, whichCollection(new Date()));
assert.equal(false, whichCollection(42));
assert.equal(false, whichCollection(NaN));
assert.equal(false, whichCollection(Infinity));
assert.equal(false, whichCollection(new Number(42)));
assert.equal(false, whichCollection(42n));
assert.equal(false, whichCollection(Object(42n)));
assert.equal(false, whichCollection('foo'));
assert.equal(false, whichCollection(Object('foo')));
assert.equal(false, whichCollection(function () {}));
assert.equal(false, whichCollection(function* () {}));
assert.equal(false, whichCollection(x => x * x));
assert.equal(false, whichCollection([]));

assert.equal('Map', whichCollection(new Map()));
assert.equal('Set', whichCollection(new Set()));
assert.equal('WeakMap', whichCollection(new WeakMap()));
assert.equal('WeakSet', whichCollection(new WeakSet()));

Tests

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

org.webjars.npm

Inspect JS

JavaScript value inspection tools.

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

Версия
1.0.1