OpenChemLib JS
    Preparing search index...

    Variable ResourcesConst

    Resources: {
        register(data: string | Record<string, string>): void;
        registerFromNodejs(path?: string): void;
        registerFromUrl(url?: string): Promise<void>;
    }

    Type declaration

    • register: function
      • Register the static resources. This is needed for some APIs.

        Parameters

        • data: string | Record<string, string>

          Object containing the resources or JSON string for such an object.

        Returns void

    • registerFromNodejs: function
      • Read and register the static resources synchronously. This is a convenience method for Node.js.

        Parameters

        • Optionalpath: string

          Path to the resources.json file. If omitted, the file will be read relative to the openchemlib.js module location.

        Returns void

    • registerFromUrl: function
      • Fetch and register the static resources asynchronously from a URL.

        Parameters

        • Optionalurl: string

          URL to the resources.json file. If omitted, fetch will be done relative to the openchemlib.js module location.

        Returns Promise<void>