Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoSign in
Socket

cpu-arch

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cpu-arch - npm Package Compare versions

Comparing version
1.1.1
to
1.1.2
+1
-3
dist/cjs/compat.js

@@ -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"}
{
"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": [