level-fix-range

WebJar for level-fix-range

Лицензия

Лицензия

MIT
Группа

Группа

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

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

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

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

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

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

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

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

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

https://github.com/dominictarr/level-fix-range

Скачать level-fix-range

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

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

Зависимости

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

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

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

level-fix-range

make reverse ranges easier to use.

this module is deprecated in favor of ltgt

Stability

Stable: Expect patches, possible features additions.

Example

When you use reverse ranges, you have to reverse the start and end also,

db.createReadStream({start: 'a', end: 'z'})
db.createReadStream({start: 'z', end: 'a', reverse: true})

this is confusing and bug-ridden.

level-fix-range fixes the options so they always make sense. if you want a range to reverse, just set reverse.

var fix = require('level-fix-range')
db.createReadStream({start: 'a', end: 'z'})
db.createReadStream(fix({start: 'a', end: 'z', reverse: true}))

When you either start OR end, and you specify reverse: true, it will also reverse the range, so that:

{start: X, end: null} //from X to end of database
{start: null, end: X} //from start of database to X

and you will get the same data, whether you have reverse: true or reverse: false, and only the order will change.

License

MIT

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

Версия
1.0.2