(id: string)
| 15 | |
| 16 | // TODO: Use `isBuiltin` from `node:module`, but Deno doesn't support it |
| 17 | export function isBuiltin(id: string): boolean { |
| 18 | if (isDeno && id.startsWith(NPM_BUILTIN_NAMESPACE)) { |
| 19 | return true |
| 20 | } |
| 21 | if (isBun && id.startsWith(BUN_BUILTIN_NAMESPACE)) { |
| 22 | return true |
| 23 | } |
| 24 | return isNodeBuiltin(id) |
| 25 | } |
| 26 | |
| 27 | export function isNodeBuiltin(id: string): boolean { |
| 28 | if (id.startsWith(NODE_BUILTIN_NAMESPACE)) { |
no test coverage detected