discontinuous-range

WebJar for discontinuous-range

Лицензия

Лицензия

MIT
Группа

Группа

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

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

discontinuous-range
Последняя версия

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

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

discontinuous-range
WebJar for discontinuous-range
Ссылка на сайт

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

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

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

https://github.com/dtudury/discontinuous-range

Скачать discontinuous-range

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

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

Зависимости

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

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

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

discontinuous-range

DiscontinuousRange(1, 10).subtract(4, 6); // [ 1-3, 7-10 ]

Build Status

this is a pretty simple module, but it exists to service another project so this'll be pretty lacking documentation. reading the test to see how this works may help. otherwise, here's an example that I think pretty much sums it up

###Example

var all_numbers = new DiscontinuousRange(1, 100); //[ 1-100 ]
var bad_numbers = DiscontinuousRange(13).add(8).add(60,80); //[8, 13, 60-80]
var good_numbers = all_numbers.clone().subtract(bad_numbers);
console.log(good_numbers.toString()); //[ 1-7, 9-12, 14-59, 81-100 ]
var random_good_number = good_numbers.index(Math.floor(Math.random() * good_numbers.length));

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

Версия
1.0.0