arcweave / fractional-indexing
Fractional Indexing implementation in PHP
v1.0.0
2023-03-01 11:53 UTC
Requires
- php: >=7.3
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is not auto-updated.
Last update: 2026-04-09 02:31:56 UTC
README
This is based on Implementing Fractional Indexing by David Greenspan .
Fractional indexing is a technique to create an ordering that can be used for Realtime Editing of Ordered Sequences.
This implementation includes variable-length integers, and the prepend/append optimization described in David's article.
This implementation was based on the JS Implementation from rocicorp.
Installation
$ composer install arcweave/fractional-indexing
Other Languages
This is a PHP port of the original JavaScript implementation by @rocicorp. That means that this implementation is byte-for-byte compatible with:
| Language | Repo |
|---|---|
| JavaScript | https://github.com/rocicorp/fractional-indexing |
| Go | https://github.com/rocicorp/fracdex |
| PHP | https://github.com/rocicorp/fractional-indexing |