@@ -20,5 +20,3 @@ "use strict"; | ||
| function stringStartsWith(str, search, position) { | ||
| if (hasStartsWith) { | ||
| return str.startsWith(search, position); | ||
| } | ||
| if (hasStartsWith) return str.startsWith(search, position); | ||
| position = position || 0; | ||
@@ -25,0 +23,0 @@ return str.indexOf(search, position) === position; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/compat.ts"],"sourcesContent":["/**\n * Compatibility Layer for Node.js 0.8+\n * Local to this package - contains only needed functions.\n */\n\n/**\n * String.prototype.startsWith wrapper for Node.js 0.8+\n * - Uses native startsWith on Node 4.0+ / ES2015+\n * - Falls back to indexOf on Node 0.8-3.x\n */\nconst hasStartsWith = typeof String.prototype.startsWith === 'function';\n\nexport function stringStartsWith(str: string, search: string, position?: number): boolean {\n if (hasStartsWith) {\n return str.startsWith(search, position);\n }\n position = position || 0;\n return str.indexOf(search, position) === position;\n}\n"],"names":["stringStartsWith","hasStartsWith","String","prototype","startsWith","str","search","position","indexOf"],"mappings":";;;;+BAYgBA;;;eAAAA;;;AAZhB;;;CAGC,GAED;;;;CAIC,GACD,IAAMC,gBAAgB,OAAOC,OAAOC,SAAS,CAACC,UAAU,KAAK;AAEtD,SAASJ,iBAAiBK,GAAW,EAAEC,MAAc,EAAEC,QAAiB;IAC7E,IAAIN,eAAe;QACjB,OAAOI,IAAID,UAAU,CAACE,QAAQC;IAChC;IACAA,WAAWA,YAAY;IACvB,OAAOF,IAAIG,OAAO,CAACF,QAAQC,cAAcA;AAC3C"} | ||
| {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/compat.ts"],"sourcesContent":["/**\n * Compatibility Layer for Node.js 0.8+\n * Local to this package - contains only needed functions.\n */\n\n/**\n * String.prototype.startsWith wrapper for Node.js 0.8+\n * - Uses native startsWith on Node 4.0+ / ES2015+\n * - Falls back to indexOf on Node 0.8-3.x\n */\nconst hasStartsWith = typeof String.prototype.startsWith === 'function';\nexport function stringStartsWith(str: string, search: string, position?: number): boolean {\n if (hasStartsWith) return str.startsWith(search, position);\n position = position || 0;\n return str.indexOf(search, position) === position;\n}\n"],"names":["stringStartsWith","hasStartsWith","String","prototype","startsWith","str","search","position","indexOf"],"mappings":";;;;+BAWgBA;;;eAAAA;;;AAXhB;;;CAGC,GAED;;;;CAIC,GACD,IAAMC,gBAAgB,OAAOC,OAAOC,SAAS,CAACC,UAAU,KAAK;AACtD,SAASJ,iBAAiBK,GAAW,EAAEC,MAAc,EAAEC,QAAiB;IAC7E,IAAIN,eAAe,OAAOI,IAAID,UAAU,CAACE,QAAQC;IACjDA,WAAWA,YAAY;IACvB,OAAOF,IAAIG,OAAO,CAACF,QAAQC,cAAcA;AAC3C"} |
@@ -10,7 +10,5 @@ /** | ||
| export function stringStartsWith(str, search, position) { | ||
| if (hasStartsWith) { | ||
| return str.startsWith(search, position); | ||
| } | ||
| if (hasStartsWith) return str.startsWith(search, position); | ||
| position = position || 0; | ||
| return str.indexOf(search, position) === position; | ||
| } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/compat.ts"],"sourcesContent":["/**\n * Compatibility Layer for Node.js 0.8+\n * Local to this package - contains only needed functions.\n */\n\n/**\n * String.prototype.startsWith wrapper for Node.js 0.8+\n * - Uses native startsWith on Node 4.0+ / ES2015+\n * - Falls back to indexOf on Node 0.8-3.x\n */\nconst hasStartsWith = typeof String.prototype.startsWith === 'function';\n\nexport function stringStartsWith(str: string, search: string, position?: number): boolean {\n if (hasStartsWith) {\n return str.startsWith(search, position);\n }\n position = position || 0;\n return str.indexOf(search, position) === position;\n}\n"],"names":["hasStartsWith","String","prototype","startsWith","stringStartsWith","str","search","position","indexOf"],"mappings":"AAAA;;;CAGC,GAED;;;;CAIC,GACD,MAAMA,gBAAgB,OAAOC,OAAOC,SAAS,CAACC,UAAU,KAAK;AAE7D,OAAO,SAASC,iBAAiBC,GAAW,EAAEC,MAAc,EAAEC,QAAiB;IAC7E,IAAIP,eAAe;QACjB,OAAOK,IAAIF,UAAU,CAACG,QAAQC;IAChC;IACAA,WAAWA,YAAY;IACvB,OAAOF,IAAIG,OAAO,CAACF,QAAQC,cAAcA;AAC3C"} | ||
| {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/compat.ts"],"sourcesContent":["/**\n * Compatibility Layer for Node.js 0.8+\n * Local to this package - contains only needed functions.\n */\n\n/**\n * String.prototype.startsWith wrapper for Node.js 0.8+\n * - Uses native startsWith on Node 4.0+ / ES2015+\n * - Falls back to indexOf on Node 0.8-3.x\n */\nconst hasStartsWith = typeof String.prototype.startsWith === 'function';\nexport function stringStartsWith(str: string, search: string, position?: number): boolean {\n if (hasStartsWith) return str.startsWith(search, position);\n position = position || 0;\n return str.indexOf(search, position) === position;\n}\n"],"names":["hasStartsWith","String","prototype","startsWith","stringStartsWith","str","search","position","indexOf"],"mappings":"AAAA;;;CAGC,GAED;;;;CAIC,GACD,MAAMA,gBAAgB,OAAOC,OAAOC,SAAS,CAACC,UAAU,KAAK;AAC7D,OAAO,SAASC,iBAAiBC,GAAW,EAAEC,MAAc,EAAEC,QAAiB;IAC7E,IAAIP,eAAe,OAAOK,IAAIF,UAAU,CAACG,QAAQC;IACjDA,WAAWA,YAAY;IACvB,OAAOF,IAAIG,OAAO,CAACF,QAAQC,cAAcA;AAC3C"} |
+1
-1
| { | ||
| "name": "cpu-arch", | ||
| "version": "1.1.1", | ||
| "version": "1.1.2", | ||
| "description": "Detect CPU architecture (handles WoW64, Rosetta 2, ARM64)", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
30640
-0.27%271
-1.45%