https://github.com/logseq/clj-fractional-indexing
Fractional Indexing in Clojure/Clojurescript
https://github.com/logseq/clj-fractional-indexing
Last synced: 3 months ago
JSON representation
Fractional Indexing in Clojure/Clojurescript
- Host: GitHub
- URL: https://github.com/logseq/clj-fractional-indexing
- Owner: logseq
- License: epl-1.0
- Created: 2024-05-22T06:28:28.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-22T07:12:45.000Z (about 1 year ago)
- Last Synced: 2025-04-05T19:05:22.327Z (3 months ago)
- Language: Clojure
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# clj-fractional-indexing
This is a Clojure port of the original JavaScript implementation https://github.com/rocicorp/fractional-indexing.
## Usage
``` clojure
(require '[logseq.clj-fractional-indexing :as index]);; Generate one key
(index/generate-key-between nil nil)
;; "a0"(generate-key-between "a0" nil)
;; "a1"(generate-key-between "a0" "a1")
;; "a0V";; Generate multiple keys
;; ["a0G" "a0V" "a0l"]
```## License
Distributed under the Eclipse Public License version 1.0.