The type of the base characters
The brand type for the fractional index
Configuration options for the fractional indexing utility
Optional
cache: FraciCacheOptional cache to improve performance by reusing computed values
A string-based fractional indexing utility instance
// Create a decimal-based fractional indexing utility
const decimalFraci = fraciString({
brand: "exampleIndex",
digitBase: "0123456789",
lengthBase: "abcdefghij"
});
// Generate a key between null and null (first key)
const [key1] = decimalFraci.generateKeyBetween(null, null);
// Generate a key between key1 and null (key after key1)
const [key2] = decimalFraci.generateKeyBetween(key1, null);
// Generate a key between key1 and key2
const [key3] = decimalFraci.generateKeyBetween(key1, key2);
Creates a string-based fractional indexing utility with the specified configuration.