cyclist

WebJar for cyclist

Лицензия

Лицензия

MIT
Категории

Категории

CLI Взаимодействие с пользователем
Группа

Группа

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

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

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

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

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

cyclist
WebJar for cyclist
Ссылка на сайт

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

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

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

https://github.com/mafintosh/cyclist

Скачать cyclist

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

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

Зависимости

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

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

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

Cyclist

Cyclist is an efficient cyclic list implemention for Javascript. It is available through npm

npm install cyclist

build status

What?

Cyclist allows you to create a list of fixed size that is cyclic. In a cyclist list the element following the last one is the first one. This property can be really useful when for example trying to order data packets that can arrive out of order over a network stream.

Usage

var cyclist = require('cyclist')
var list = cyclist(4)

list.put(42, 'hello 42') // store something and index 42
list.put(43, 'hello 43') // store something and index 43

console.log(list.get(42)) // prints hello 42
console.log(list.get(46)) // prints hello 42 again since 46 - 42 == list.size

API

  • cyclist(size) creates a new buffer
  • cyclist#get(index) get an object stored in the buffer
  • cyclist#put(index,value) insert an object into the buffer
  • cyclist#del(index) delete an object from an index
  • cyclist#size property containing current size of buffer

License

MIT

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

Версия
1.0.1
0.2.2-1
0.2.2