codejson-crosswalk - v0.1.0
    Preparing search index...

    Function fromCodejsonToCodemeta

    • Converts a code.json document to a codemeta document.

      Accepts either a file path (read via Bun's file API) or an already-parsed object. Field mapping is driven by the internal code.json-to-codemeta mapping table.

      Parameters

      • input: string | Record<string, unknown>

        Path to a code.json file, or a pre-parsed code.json object.

      Returns Promise<Record<string, unknown>>

      A codemeta-shaped object with all mapped fields populated, including the required @context and @type properties.

      // from a file
      const codemeta = await fromCodejsonToCodemeta("code.json")

      // from an object
      const codemeta = await fromCodejsonToCodemeta({ name: "my-project", ... })