(id: string)
| 39 | } |
| 40 | |
| 41 | export function toBuiltin(id: string): string { |
| 42 | if (id.startsWith(browserExternalId)) { |
| 43 | id = id.slice(browserExternalLength) |
| 44 | } |
| 45 | if ( |
| 46 | id.startsWith(NPM_BUILTIN_NAMESPACE) |
| 47 | || id.startsWith(BUN_BUILTIN_NAMESPACE) |
| 48 | || id.startsWith(NODE_BUILTIN_NAMESPACE) |
| 49 | ) { |
| 50 | return id |
| 51 | } |
| 52 | if (isDeno || isBun) { |
| 53 | return id |
| 54 | } |
| 55 | return `node:${id}` |
| 56 | } |
no outgoing calls
no test coverage detected