@ultraq/array-utils

WebJar for @ultraq/array-utils

Лицензия

Лицензия

Группа

Группа

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

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

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

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

2.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

@ultraq/array-utils
WebJar for @ultraq/array-utils
Ссылка на сайт

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

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

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

https://github.com/ultraq/array-utils

Скачать ultraq__array-utils

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

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

Зависимости

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

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

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

array-utils

Build Status Coverage Status npm Bundlephobia minified size

A collection of array utilities, meant as a zero-dependency way of working with arrays.

Installation

Via npm:

npm install @ultraq/array-utils

API

flatten(array)

Flattens an array of arrays of infinite depth into a single-dimension array.

This is now natively in JavaScript as the flat method on an Array instance. Check MDN for which browsers have access to this feature. If you can't use flat, then this method will do the job 🙂

  • array: The array of arrays to flatten

range(start, end, step)

Creates an array of numbers from the starting value (inclusive) to the end (exclusive), with an optional step (the gap between values).

  • start: The value to start at, the first item in the returned array.
  • end: The value to end with, the last item in the returned array.
  • step: The increment/gap between values, defaults to 1.

remove(array, predicate)

Remove and return the first item from array that matches the predicate function.

  • array: The array to search and remove an item from
  • predicate: Function to test each item of the array with. If it returns a truthy value for the item, then that item is removed and returned.

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

Версия
2.1.0
2.0.0
1.1.0