Function prepareZXingModule

  • Parameters

    • Optionaloptions: {
          equalityFn?: (
              cachedOverrides: Partial<EmscriptenModule>,
              overrides: Partial<EmscriptenModule>,
          ) => boolean;
          fireImmediately?: false;
          overrides?: Partial<EmscriptenModule>;
      }
      • OptionalequalityFn?: (
            cachedOverrides: Partial<EmscriptenModule>,
            overrides: Partial<EmscriptenModule>,
        ) => boolean

        A function to compare the cached overrides with the input overrides. So that the module promise can be reused if the overrides are the same. Defaults to a shallow equality function.

      • OptionalfireImmediately?: false
      • Optionaloverrides?: Partial<EmscriptenModule>

        The Emscripten module overrides to be passed to the factory function. The locateFile function is overridden by default to load the WASM file from the jsDelivr CDN.

    Returns void

  • Parameters

    • options: {
          equalityFn?: (
              cachedOverrides: Partial<EmscriptenModule>,
              overrides: Partial<EmscriptenModule>,
          ) => boolean;
          fireImmediately: true;
          overrides?: Partial<EmscriptenModule>;
      }
      • OptionalequalityFn?: (
            cachedOverrides: Partial<EmscriptenModule>,
            overrides: Partial<EmscriptenModule>,
        ) => boolean

        A function to compare the cached overrides with the input overrides. So that the module promise can be reused if the overrides are the same. Defaults to a shallow equality function.

      • fireImmediately: true
      • Optionaloverrides?: Partial<EmscriptenModule>

        The Emscripten module overrides to be passed to the factory function. The locateFile function is overridden by default to load the WASM file from the jsDelivr CDN.

    Returns Promise<ZXingFullModule>

  • Parameters

    Returns void | Promise<ZXingFullModule>