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

    Function policyOf

    • The policy the block name states with said, the value of its cooper-secrets key (undefined when it has none).

      The two modes are atoms (keep, reveal), and a wrapper is a string, because a CASC atom cannot hold the dots a module name has. A wrapper is resolved here, once per block and whether or not the block holds a secret, so a typo in the name fails at startup rather than never.

      Parameters

      • said: unknown
      • name: string

        the block, for messages

      • modules: Record<string, unknown> | Map<string, unknown> | undefined

        cooper's modules load option

      Returns Policy

      for anything that is no policy, or a wrapper that cannot be resolved