Files
NapCatQQ/.pnpm-store/v3/files/b6/052a6eaa5d0c1c78c955cc762c610952dc7229be21084e1fe00c31b8fe82bc5db26c35837e1fbca10632d86a78c68c8af8592117aead16971f513be0c87b41
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

22 lines
668 B
Plaintext

"use strict"
const { isBuiltin } = require("node:module")
/**
* Extend traceMap.modules with `node:` prefixed modules
* @template {import('@eslint-community/eslint-utils').TraceMap<*>} TraceMap
* @param {TraceMap} modules Like `{assert: foo}`
* @returns {TraceMap} Like `{assert: foo}, "node:assert": foo}`
*/
module.exports = function extendTraceMapWithNodePrefix(modules) {
const ret = {
...modules,
...Object.fromEntries(
Object.entries(modules)
.map(([name, value]) => [`node:${name}`, value])
.filter(([name]) => typeof name === "string" && isBuiltin(name))
),
}
return ret
}