node-cooper-config - v0.2.0
    Preparing search index...

    Variable loadConst

    load: (options?: LoadOptions) => Readonly<Record<string, any>> = api.load

    Type Declaration

      • (options?: LoadOptions): Readonly<Record<string, any>>
      • Loads the configuration and stores it process-wide, replacing whatever an earlier call stored. Synchronous: every resolver, tag and import scheme passed through must return its value directly.

        The file is config/config.casc under the project root (the directory of the nearest package.json above process.cwd(), else process.cwd()), or options.path. A missing default file loads an empty configuration; a missing options.path is an error.

        Nothing is stored when the load fails: whatever was there before stays. A program with half its configuration is worse off than one told why it has none.

        Parameters

        Returns Readonly<Record<string, any>>

        the stored configuration, as all() returns it

        for an unknown option, or a path/root that is not a string

        when the document does not load, or its conversion refuses a value