Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24476,9 +24476,9 @@ function comparePackSizes(basePacks, sourcePacks, threshold) {
}

// node_modules/module-replacements/dist/main.js
import nativeRaw from "./native-KFM4GA2L.json" with { type: "json" };
import microUtilsRaw from "./micro-utilities-TIPUUG5E.json" with { type: "json" };
import preferredRaw from "./preferred-U26KKZIW.json" with { type: "json" };
import nativeRaw from "./native-7HWYIGGW.json" with { type: "json" };
import microUtilsRaw from "./micro-utilities-PCCWHRB5.json" with { type: "json" };
import preferredRaw from "./preferred-UHEGOVP6.json" with { type: "json" };

// node_modules/module-replacements/dist/util.js
function resolveDocUrl(url) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@
"description": "You can check the first two bytes of a buffer to detect if it's compressed using deflate.",
"example": "function isDeflate(buf) {\n if (buf.length < 2 || buf[0] !== 0x78) return false;\n const b = buf[1];\n return b === 1 || b === 0x9c || b === 0xda;\n}"
},
"snippet::is-electron": {
"id": "snippet::is-electron",
"type": "simple",
"description": "You can detect Electron by checking the renderer process type, `process.versions.electron`, or the user agent.",
"example": "function isElectron() {\n return Boolean(\n globalThis.window?.process?.type === \"renderer\" ||\n globalThis.process?.versions?.electron ||\n globalThis.navigator?.userAgent?.includes(\"Electron\")\n );\n}"
},
"snippet::is-equal": {
"id": "snippet::is-equal",
"type": "simple",
Expand All @@ -172,7 +178,7 @@
"id": "snippet::is-function",
"type": "simple",
"description": "You can use `typeof` to check if a value is a function.",
"example": "const isString = (value) => typeof value === \"function\";"
"example": "typeof value === \"function\""
},
"snippet::is-generator-function": {
"id": "snippet::is-generator-function",
Expand Down Expand Up @@ -252,6 +258,12 @@
"description": "You can use `instanceof RegExp` to check if a value is a regular expression, or if cross-realm, use `Object.prototype.toString.call(v) === \"[object RegExp]\"`.",
"example": "const isRegExp = (v) => v instanceof RegExp;\n// for cross-realm\nconst isRegExpCrossRealm = Object.prototype.toString.call(v) === \"[object RegExp]\";"
},
"snippet::is-set": {
"id": "snippet::is-set",
"type": "simple",
"description": "You can use `instanceof Set` to check if a value is a `Set`, or if cross-realm, use `Object.prototype.toString.call(v) === \"[object Set]\"`",
"example": "const isSet = v instanceof Set;\n// for cross-realm\nconst isSetCrossRealm = Object.prototype.toString.call(v) === \"[object Set]\""
},
"snippet::is-stream": {
"id": "snippet::is-stream",
"type": "simple",
Expand Down Expand Up @@ -294,6 +306,12 @@
"description": "You can check if the current environment is Windows by checking if `process.platform` is equal to \"win32\".",
"example": "const isWindows = () => process.platform === \"win32\";"
},
"snippet::is-wsl": {
"id": "snippet::is-wsl",
"type": "simple",
"description": "You can check if the current environment is WSL by checking if the `WSL_DISTRO_NAME` environment variable is set.",
"example": "const isWsl = Boolean(process.env.WSL_DISTRO_NAME);"
},
"snippet::json-file": {
"id": "snippet::json-file",
"type": "simple",
Expand Down Expand Up @@ -336,6 +354,12 @@
"description": "You can use `Object.entries` and `Array.prototype.reduce`.",
"example": "const objectReduce = (obj, fn, initial) => Object.entries(obj).reduce((acc, [k, v]) => fn(acc, k, v), initial);"
},
"snippet::path-key": {
"id": "snippet::path-key",
"type": "simple",
"description": "You can use `Object.keys` with `Array.prototype.findLast` to find the case-insensitive `PATH` environment variable key.",
"example": "const pathKey = Object.keys(process.env).findLast((k) => k.toUpperCase() === 'PATH') ?? 'PATH';"
},
"snippet::regexp-copy": {
"id": "snippet::regexp-copy",
"type": "simple",
Expand Down Expand Up @@ -563,6 +587,11 @@
"moduleName": "is-deflate",
"replacements": ["snippet::is-deflate-buffer"]
},
"is-electron": {
"type": "module",
"moduleName": "is-electron",
"replacements": ["snippet::is-electron"]
},
"is-even": {
"type": "module",
"moduleName": "is-even",
Expand Down Expand Up @@ -653,6 +682,11 @@
"moduleName": "is-regexp",
"replacements": ["snippet::is-regexp"]
},
"is-set": {
"type": "module",
"moduleName": "is-set",
"replacements": ["snippet::is-set"]
},
"is-stream": {
"type": "module",
"moduleName": "is-stream",
Expand Down Expand Up @@ -683,6 +717,11 @@
"moduleName": "is-windows",
"replacements": ["snippet::is-windows"]
},
"is-wsl": {
"type": "module",
"moduleName": "is-wsl",
"replacements": ["snippet::is-wsl"]
},
"isobject": {
"type": "module",
"moduleName": "isobject",
Expand Down Expand Up @@ -803,6 +842,11 @@
"moduleName": "object.reduce",
"replacements": ["snippet::object-reduce"]
},
"path-key": {
"type": "module",
"moduleName": "path-key",
"replacements": ["snippet::path-key"]
},
"shebang-regex": {
"type": "module",
"moduleName": "shebang-regex",
Expand Down Expand Up @@ -843,6 +887,11 @@
"moduleName": "upper-case",
"replacements": ["snippet::to-uppercase"]
},
"validate.io-function": {
"type": "module",
"moduleName": "validate.io-function",
"replacements": ["snippet::is-function"]
},
"year": {
"type": "module",
"moduleName": "year",
Expand Down
Loading