fraci
    Preparing search index...

    Function fraciString

    • Creates a string-based fractional indexing utility with the specified configuration.

      Type Parameters

      • const B extends StringFraciOptions

        The type of the base characters

      • const X = unknown

        The brand type for the fractional index

      Parameters

      • options: BrandableOptions<B, X>

        Configuration options for the fractional indexing utility

      • Optionalcache: FraciCache

        Optional cache to improve performance by reusing computed values

      Returns Fraci<FraciOptionsBaseToBase<B>, X>

      A string-based fractional indexing utility instance

      When the digit or length base strings are invalid

      // 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);
      • Fraci - The main fractional indexing utility type
      • StringFraciOptions - The options for the string fractional indexing utility
      • FraciCache - The cache for storing computed values
      • fraci - The unified factory function for creating fractional indexing utilities
      • fraciBinary - The factory function for creating binary-based fractional indexing utilities