IFClite TypeScript API
    Preparing search index...

    Function activeFlavorPointerAlreadyStored

    • Whether the persisted active-flavor pointer already holds exactly pointer — i.e. whether writing pointer would change nothing.

      read is the host's way of reading the pointer back and pointer is the value that would have been written, which callers build with activeFlavorPointer so the compared value is the written value by construction. Every host that asks this question asks it in exactly this shape, so it lives here once: an encoding change to the pointer lands in activeFlavorPointer and this comparison follows it, in every package.

      One-directional on purpose: false only means "not provably a no-op". A host that cannot read the pointer back, or whose read fails, answers false, because the write really might have changed it. A caller uses this to let a refused write pass, and letting one pass that would have moved the pointer is the failure that matters.

      The same asymmetry governs a non-string pointer: the type forbids it, but if one arrives, undefined === undefined against an unset pointer would report a refused write with nothing stored as a successful one. That is the unsafe direction, so it answers false.

      Parameters

      • read: (() => Promise<string | undefined>) | undefined
      • pointer: string | undefined

      Returns Promise<boolean>