arcweave / fractional-indexing
Fractional Indexing implementation in PHP
Installs: 3 914
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 1
pkg:composer/arcweave/fractional-indexing
Requires
- php: >=7.3
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is not auto-updated.
Last update: 2025-12-18 00:57:18 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 |