UNPKG

deno2node

Version:

`tsc` replacement for transpiling Deno libraries to run on Node.js.

15 lines (14 loc) 608 B
// deno-lint-ignore no-explicit-any export function parse({ shim, vendorDir, ...rest }) { if (typeof shim !== "string" && typeof shim !== "undefined") { throw new TypeError("deno2node option 'shim' requires a value of type string."); } if (typeof vendorDir !== "string" && typeof vendorDir !== "undefined") { throw new TypeError("deno2node option 'vendorDir' requires a value of type string."); } const unknown = Object.keys(rest); if (unknown.length) { throw new TypeError(`Unknown deno2node option '${unknown[0]}'.`); } return { shim, vendorDir }; }