remove-array-items

WebJar for remove-array-items

Лицензия

Лицензия

MIT
Группа

Группа

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

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

remove-array-items
Последняя версия

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

1.1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

remove-array-items
WebJar for remove-array-items
Ссылка на сайт

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

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

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

https://github.com/mreinstein/remove-array-items

Скачать remove-array-items

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

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

Зависимости

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

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

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

remove-array-items

remove items from a javascript array without generating memory garbage.

Build Status

Despite there being a number of "remove array items" in npm, I couldn't find satisfying all criteria:

  • doesn't generate garbage
  • performs similar or better to the native array.splice
  • has tests
  • es3+ compatible
  • works in both commonjs (node) and es modules (import)

so here we are.

originally inspired by https://gamealchemist.wordpress.com/2013/05/01/lets-get-those-javascript-arrays-to-work-fast/

(which is a gold mine for performant, non-garbage generating array operations by the way.)

api

removeItems(arr, startIdx, removeCount)

startIdx is an integer >= 0, and removeCount is an integer > 0.

example usage

const arr = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]

removeItems(arr, 3, 4)  // after running, arr === [ 1, 2, 3, 8, 9 ]

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

Версия
1.1.1
1.0.0