IdaJS
    Preparing search index...

    Variable oneIfTrue

    oneIfTrue: (
        store: Record<string, any>,
        stateName: string,
        customState?: any,
    ) => boolean

    Checks if the specified state is truthy and triggers only once. After the function returns true for the first time, it will return false for all subsequent calls.

    Type Declaration

      • (store: Record<string, any>, stateName: string, customState?: any): boolean
      • Parameters

        • store: Record<string, any>

          Any object that will serve as backing state storage (scene store)

        • stateName: string

          The name of the state in the object to check. The backing state will be prefixed with "__1" from this name.

        • OptionalcustomState: any

          Optional custom state to check instead of the store state

        Returns boolean

        true if the state is truthy and hasn't been triggered before, false otherwise