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.
Example
// from a file constcodemeta = awaitfromCodejsonToCodemeta("code.json")
// from an object constcodemeta = awaitfromCodejsonToCodemeta({ name:"my-project", ... })
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.