unpeek 1.2.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +20 -9
  2. package/README.tr.md +20 -9
  3. package/assets/banner-dark.svg +22 -0
  4. package/assets/banner-light.svg +22 -0
  5. package/assets/banner.svg +39 -0
  6. package/dist/ast/index.cjs +79 -20
  7. package/dist/ast/index.cjs.map +1 -1
  8. package/dist/ast/index.js +79 -20
  9. package/dist/ast/index.js.map +1 -1
  10. package/dist/browser.cjs +79 -20
  11. package/dist/browser.cjs.map +1 -1
  12. package/dist/browser.js +79 -20
  13. package/dist/browser.js.map +1 -1
  14. package/dist/bundler/unplugin.cjs +79 -20
  15. package/dist/bundler/unplugin.cjs.map +1 -1
  16. package/dist/bundler/unplugin.js +79 -20
  17. package/dist/bundler/unplugin.js.map +1 -1
  18. package/dist/cli/index.cjs +185 -63
  19. package/dist/cli/index.cjs.map +1 -1
  20. package/dist/cli/index.js +185 -63
  21. package/dist/cli/index.js.map +1 -1
  22. package/dist/cli/protect.cjs +79 -20
  23. package/dist/cli/protect.cjs.map +1 -1
  24. package/dist/cli/protect.js +79 -20
  25. package/dist/cli/protect.js.map +1 -1
  26. package/dist/esbuild.cjs +79 -20
  27. package/dist/esbuild.cjs.map +1 -1
  28. package/dist/esbuild.js +79 -20
  29. package/dist/esbuild.js.map +1 -1
  30. package/dist/index.cjs +185 -63
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.js +185 -63
  33. package/dist/index.js.map +1 -1
  34. package/dist/rollup.cjs +79 -20
  35. package/dist/rollup.cjs.map +1 -1
  36. package/dist/rollup.js +79 -20
  37. package/dist/rollup.js.map +1 -1
  38. package/dist/runtime/index.cjs +3 -1
  39. package/dist/runtime/index.cjs.map +1 -1
  40. package/dist/runtime/index.js +3 -1
  41. package/dist/runtime/index.js.map +1 -1
  42. package/dist/vite.cjs +79 -20
  43. package/dist/vite.cjs.map +1 -1
  44. package/dist/vite.js +79 -20
  45. package/dist/vite.js.map +1 -1
  46. package/dist/webpack.cjs +79 -20
  47. package/dist/webpack.cjs.map +1 -1
  48. package/dist/webpack.js +79 -20
  49. package/dist/webpack.js.map +1 -1
  50. package/package.json +2 -1
@@ -453,6 +453,8 @@ function isPascalCaseComponent(name) {
453
453
  function analyzeAstHotPaths(ast) {
454
454
  const hotFunctionNodes = /* @__PURE__ */ new WeakSet();
455
455
  const coldFunctionNodes = /* @__PURE__ */ new WeakSet();
456
+ const hotExemptNodes = /* @__PURE__ */ new WeakSet();
457
+ const directHotNodes = /* @__PURE__ */ new Set();
456
458
  const allFunctions = [];
457
459
  const fnByName = /* @__PURE__ */ new Map();
458
460
  const callerToCallees = /* @__PURE__ */ new Map();
@@ -463,6 +465,7 @@ function analyzeAstHotPaths(ast) {
463
465
  fnByName.set(name, node);
464
466
  if (isPascalCaseComponent(name)) {
465
467
  hotFunctionNodes.add(node);
468
+ directHotNodes.add(node);
466
469
  }
467
470
  },
468
471
  FunctionExpression(node, _state, ancestors) {
@@ -471,6 +474,7 @@ function analyzeAstHotPaths(ast) {
471
474
  fnByName.set(name, node);
472
475
  if (isPascalCaseComponent(name)) {
473
476
  hotFunctionNodes.add(node);
477
+ directHotNodes.add(node);
474
478
  }
475
479
  },
476
480
  ArrowFunctionExpression(node, _state, ancestors) {
@@ -479,6 +483,7 @@ function analyzeAstHotPaths(ast) {
479
483
  fnByName.set(name, node);
480
484
  if (isPascalCaseComponent(name)) {
481
485
  hotFunctionNodes.add(node);
486
+ directHotNodes.add(node);
482
487
  }
483
488
  },
484
489
  CallExpression(node, _state, ancestors) {
@@ -505,6 +510,8 @@ function analyzeAstHotPaths(ast) {
505
510
  for (const arg of node.arguments || []) {
506
511
  if (FUNCTION_NODE_TYPES.has(arg.type)) {
507
512
  hotFunctionNodes.add(arg);
513
+ directHotNodes.add(arg);
514
+ hotExemptNodes.add(arg);
508
515
  }
509
516
  }
510
517
  }
@@ -512,27 +519,51 @@ function analyzeAstHotPaths(ast) {
512
519
  for (let i = ancestors.length - 1; i >= 0; i--) {
513
520
  if (FUNCTION_NODE_TYPES.has(ancestors[i].type)) {
514
521
  hotFunctionNodes.add(ancestors[i]);
522
+ directHotNodes.add(ancestors[i]);
515
523
  break;
516
524
  }
517
525
  }
518
526
  }
519
527
  },
520
- ForStatement(_node, _state, ancestors) {
521
- markEnclosingFunctionHot(ancestors, hotFunctionNodes);
528
+ ForStatement(node, _state, ancestors) {
529
+ hotExemptNodes.add(node);
530
+ markEnclosingFunctionHot(ancestors, hotFunctionNodes, directHotNodes);
522
531
  },
523
- ForInStatement(_node, _state, ancestors) {
524
- markEnclosingFunctionHot(ancestors, hotFunctionNodes);
532
+ ForInStatement(node, _state, ancestors) {
533
+ hotExemptNodes.add(node);
534
+ markEnclosingFunctionHot(ancestors, hotFunctionNodes, directHotNodes);
525
535
  },
526
- ForOfStatement(_node, _state, ancestors) {
527
- markEnclosingFunctionHot(ancestors, hotFunctionNodes);
536
+ ForOfStatement(node, _state, ancestors) {
537
+ hotExemptNodes.add(node);
538
+ markEnclosingFunctionHot(ancestors, hotFunctionNodes, directHotNodes);
528
539
  },
529
- WhileStatement(_node, _state, ancestors) {
530
- markEnclosingFunctionHot(ancestors, hotFunctionNodes);
540
+ WhileStatement(node, _state, ancestors) {
541
+ hotExemptNodes.add(node);
542
+ markEnclosingFunctionHot(ancestors, hotFunctionNodes, directHotNodes);
531
543
  },
532
- DoWhileStatement(_node, _state, ancestors) {
533
- markEnclosingFunctionHot(ancestors, hotFunctionNodes);
544
+ DoWhileStatement(node, _state, ancestors) {
545
+ hotExemptNodes.add(node);
546
+ markEnclosingFunctionHot(ancestors, hotFunctionNodes, directHotNodes);
534
547
  }
535
548
  });
549
+ const forwardHotSet = new Set(directHotNodes);
550
+ let forwardChanged = true;
551
+ while (forwardChanged) {
552
+ forwardChanged = false;
553
+ for (const callerNode of Array.from(forwardHotSet)) {
554
+ const calleeNames = callerToCallees.get(callerNode);
555
+ if (!calleeNames) continue;
556
+ for (const cName of calleeNames) {
557
+ const targetNode = fnByName.get(cName);
558
+ if (targetNode && !forwardHotSet.has(targetNode)) {
559
+ forwardHotSet.add(targetNode);
560
+ hotFunctionNodes.add(targetNode);
561
+ hotExemptNodes.add(targetNode);
562
+ forwardChanged = true;
563
+ }
564
+ }
565
+ }
566
+ }
536
567
  let changed = true;
537
568
  while (changed) {
538
569
  changed = false;
@@ -565,13 +596,17 @@ function analyzeAstHotPaths(ast) {
565
596
  coldFunctionsProtected
566
597
  },
567
598
  hotFunctionNodes,
568
- coldFunctionNodes
599
+ coldFunctionNodes,
600
+ hotExemptNodes
569
601
  };
570
602
  }
571
- function markEnclosingFunctionHot(ancestors, hotSet) {
603
+ function markEnclosingFunctionHot(ancestors, hotSet, directHotSet) {
572
604
  for (let i = ancestors.length - 1; i >= 0; i--) {
573
605
  if (FUNCTION_NODE_TYPES.has(ancestors[i].type)) {
574
606
  hotSet.add(ancestors[i]);
607
+ if (directHotSet) {
608
+ directHotSet.add(ancestors[i]);
609
+ }
575
610
  break;
576
611
  }
577
612
  }
@@ -590,7 +625,7 @@ var HELPER_TEMPLATE = acorn2.parse(
590
625
  `const _ = [].map(function(a) {
591
626
  var s = "";
592
627
  for (var j = 0; j < a.length; j++) {
593
- s += String.fromCharCode(a.charCodeAt(j) ^ (((0 ^ ((j & 1) * 0)) & 30) | 1));
628
+ s += String.fromCharCode(a.charCodeAt(j) ^ (((0 ^ (a._u | ((j & 1) * 0))) & 30) | 1));
594
629
  }
595
630
  return s;
596
631
  });`,
@@ -611,8 +646,8 @@ function createVaultHelperAst(cacheVarName, encryptedPayloads, mask, step) {
611
646
  const innerLeft = binaryXor.right.left.left;
612
647
  innerLeft.left.value = mask;
613
648
  innerLeft.left.raw = String(mask);
614
- innerLeft.right.right.value = step;
615
- innerLeft.right.right.raw = String(step);
649
+ innerLeft.right.right.right.value = step;
650
+ innerLeft.right.right.right.raw = String(step);
616
651
  return node;
617
652
  }
618
653
  function computeFnv1aHash(input, seed = 2166136261) {
@@ -632,7 +667,7 @@ function encodeStringWithSeed(str, mask, step) {
632
667
  }
633
668
  return out;
634
669
  }
635
- function applyStringVault(ast, seed = 2654435769, minStringLength = 4) {
670
+ function applyStringVault(ast, seed = 2654435769, minStringLength = 4, hotExemptNodes) {
636
671
  const suffix = ((seed >>> 0) % 255).toString(36);
637
672
  const cacheVarName = `_uC${suffix}`;
638
673
  const mask = seed >>> 0 & 30 | 3;
@@ -646,6 +681,13 @@ function applyStringVault(ast, seed = 2654435769, minStringLength = 4) {
646
681
  const val = node.value;
647
682
  if (val.length < minStringLength) return;
648
683
  if (DIRECTIVE_STRINGS.has(val)) return;
684
+ if (hotExemptNodes) {
685
+ for (let i = ancestors.length - 2; i >= 0; i--) {
686
+ if (hotExemptNodes.has(ancestors[i])) {
687
+ return;
688
+ }
689
+ }
690
+ }
649
691
  const parent = ancestors[ancestors.length - 2];
650
692
  if (!parent) return;
651
693
  if (parent.type === "ExpressionStatement" && parent.directive) return;
@@ -978,7 +1020,17 @@ function createOpaqueGuardStatement(seed, fnIndex) {
978
1020
  type: "BinaryExpression",
979
1021
  operator: "^",
980
1022
  left: { type: "Literal", value: a, raw: String(a) },
981
- right: { type: "Literal", value: b, raw: String(b) }
1023
+ right: {
1024
+ type: "BinaryExpression",
1025
+ operator: "|",
1026
+ left: { type: "Literal", value: b, raw: String(b) },
1027
+ right: {
1028
+ type: "UnaryExpression",
1029
+ operator: "!",
1030
+ prefix: true,
1031
+ argument: { type: "Identifier", name: "String" }
1032
+ }
1033
+ }
982
1034
  },
983
1035
  right: { type: "Literal", value: 7, raw: "7" }
984
1036
  },
@@ -1035,6 +1087,7 @@ function deriveLocalVar(label, seed) {
1035
1087
  }
1036
1088
  function createDeterrentSnippet(config) {
1037
1089
  const seed = config.seed >>> 0;
1090
+ const expectedToken = (config.expectedIntegrityHash ?? seed) >>> 0;
1038
1091
  const deterrentMode = config.deterrentMode ?? "passive";
1039
1092
  const fnName = deriveIntegrityFnName(seed);
1040
1093
  const strVar = deriveLocalVar("s", seed);
@@ -1043,9 +1096,10 @@ function createDeterrentSnippet(config) {
1043
1096
  const methodsVar = deriveLocalVar("m", seed);
1044
1097
  const idxVar = deriveLocalVar("i", seed);
1045
1098
  const errVar = deriveLocalVar("e", seed);
1099
+ const tokenBit = expectedToken & 1;
1046
1100
  const gradualConsoleSilence = deterrentMode === "gradual" ? `if(typeof console!=='undefined'){var ${noopVar}=function(){},${methodsVar}=['log','debug','info','table','dir'];for(var ${idxVar}=0;${idxVar}<${methodsVar}.length;${idxVar}++){try{console[${methodsVar}[${idxVar}]]=${noopVar};}catch(${errVar}){}}}` : "";
1047
1101
  const tamperDispatch = `if(typeof window.dispatchEvent==='function'&&typeof CustomEvent==='function'){try{window.dispatchEvent(new CustomEvent('unpeek:tamper'));}catch(${errVar}){}}`;
1048
- return `(function ${fnName}(){if(typeof window!=='undefined'){try{var ${strVar}=Function.prototype.toString,${tamperVar}=${strVar}.call(${strVar}).indexOf('[native code]')===-1||${strVar}.call(${fnName}).indexOf('\\n')!==-1||${strVar}.call(${fnName}).indexOf('\\r')!==-1;if(${tamperVar}){window.__unpeek_tampered=!0;${tamperDispatch}${gradualConsoleSilence}}}catch(${errVar}){}}})();`;
1102
+ return `(function ${fnName}(){if(typeof window!=='undefined'){try{var ${strVar}=Function.prototype.toString,${tamperVar}=${strVar}.call(${strVar}).indexOf('[native code]')<${tokenBit - 1}||${strVar}.call(${fnName}).indexOf('\\n')!==-1||${strVar}.call(${fnName}).indexOf('\\r')!==-1;if(${tamperVar}){window.__unpeek_tampered=!0;String.prototype._u=14;${tamperDispatch}${gradualConsoleSilence}}}catch(${errVar}){}}})();`;
1049
1103
  }
1050
1104
 
1051
1105
  // src/runtime/index.ts
@@ -1091,13 +1145,18 @@ function transformJavaScript(code, options = {}) {
1091
1145
  integrityToken: computeFnv1aHash(code, seed)
1092
1146
  };
1093
1147
  }
1094
- const { report: hotPathReport, coldFunctionNodes } = analyzeAstHotPaths(ast);
1148
+ const {
1149
+ report: hotPathReport,
1150
+ coldFunctionNodes,
1151
+ hotExemptNodes
1152
+ } = analyzeAstHotPaths(ast);
1095
1153
  applyColdFlowGuard(ast, coldFunctionNodes, seed);
1096
1154
  const mangledSymbolsCount = applyPolymorphicMangler(ast, seed);
1097
1155
  const { encryptedStringsCount, integrityToken } = applyStringVault(
1098
1156
  ast,
1099
1157
  seed,
1100
- minStringLength
1158
+ minStringLength,
1159
+ hotExemptNodes
1101
1160
  );
1102
1161
  const outputCode = (0, import_astring.generate)(ast, { indent: "", lineEnd: "" });
1103
1162
  let finalCode = outputCode;
@@ -1224,7 +1283,7 @@ ${finalCode}`;
1224
1283
  }
1225
1284
 
1226
1285
  // src/cli/index.ts
1227
- var VERSION = "1.2.0";
1286
+ var VERSION = "1.5.0";
1228
1287
  function getPackageVersion() {
1229
1288
  try {
1230
1289
  const pkgUrl = new URL("../../package.json", importMetaUrl);
@@ -1236,25 +1295,52 @@ function getPackageVersion() {
1236
1295
  }
1237
1296
  }
1238
1297
  var RUNTIME_VERSION = getPackageVersion();
1298
+ var MARK_TOP = " \u259B\u2580\u2580\u259C";
1299
+ var MARK_BOTTOM = " \u2599\u2584\u2584\u259F";
1300
+ var RULE = "\u2500";
1301
+ var LABEL_WIDTH = 19;
1302
+ function colorEnabled() {
1303
+ if (process.env.NO_COLOR) return false;
1304
+ if (process.env.TERM === "dumb") return false;
1305
+ return Boolean(process.stdout.isTTY);
1306
+ }
1307
+ function paint(code, text) {
1308
+ return colorEnabled() ? `\x1B[${code}m${text}\x1B[0m` : text;
1309
+ }
1310
+ function dim(text) {
1311
+ return paint("2", text);
1312
+ }
1313
+ function brandBlock() {
1314
+ return [
1315
+ `${MARK_TOP} ${paint("1", `unpeek ${RUNTIME_VERSION}`)}`,
1316
+ `${MARK_BOTTOM} ${dim("client bundle protection")}`
1317
+ ].join("\n");
1318
+ }
1319
+ function sectionBlock(title, rows) {
1320
+ const fill = Math.max(2, 46 - title.length);
1321
+ const header = ` ${dim(title)} ${dim(RULE.repeat(fill))}`;
1322
+ const body = rows.map(([label, value]) => ` ${dim(label.padEnd(LABEL_WIDTH))} ${value}`);
1323
+ return [header, ...body].join("\n");
1324
+ }
1239
1325
  function printHelp() {
1240
- const helpText = `
1241
- unpeek v${VERSION} \u2014 Call-graph-aware polymorphic AST obfuscation & runtime shield
1242
-
1243
- Usage:
1244
- unpeek init [--dry-run] Configure postbuild hook & .unpeek-maps/ vault
1245
- unpeek protect [options] Protect client bundles in-place
1246
-
1247
- Options:
1248
- --out-dir <dir> Explicit client output directory
1249
- --seed <number> Deterministic polymorphic seed
1250
- --passive Use passive deterrent mode instead of gradual
1251
- --no-maps Delete .map files instead of vaulting to .unpeek-maps/
1252
- --min-string-length <num> Minimum string length for encryption vault (default: 4)
1253
- --private-maps-dir <dir> Directory to store vaulted source maps (default: .unpeek-maps)
1254
- --no-shield Do not inject runtime anti-tamper deterrent shield
1255
- -h, --help Show help message
1256
- -v, --version Show version number
1257
- `.trim();
1326
+ const helpText = [
1327
+ brandBlock(),
1328
+ "",
1329
+ " Usage:",
1330
+ " unpeek init [--dry-run] wire postbuild and the .unpeek-maps/ vault",
1331
+ " unpeek protect [options] protect client bundles in place",
1332
+ "",
1333
+ " Options:",
1334
+ " --out-dir <dir> explicit client output directory",
1335
+ " --seed <number> deterministic polymorphic seed",
1336
+ " --passive passive deterrent mode instead of gradual",
1337
+ " --no-maps delete .map files instead of vaulting them",
1338
+ " --min-string-length <num> minimum string length for the vault (default: 4)",
1339
+ " --private-maps-dir <dir> vault directory (default: .unpeek-maps)",
1340
+ " --no-shield skip the runtime anti-tamper shield",
1341
+ " -h, --help show help",
1342
+ " -v, --version show version"
1343
+ ].join("\n");
1258
1344
  console.log(helpText);
1259
1345
  }
1260
1346
  function formatBytes(bytes) {
@@ -1263,30 +1349,66 @@ function formatBytes(bytes) {
1263
1349
  }
1264
1350
  function printSummaryTable(summary) {
1265
1351
  const sign = summary.gzipDeltaPercent > 0 ? "+" : "";
1266
- const rows = [
1267
- ["Framework", summary.framework],
1268
- ["Client OutDir", summary.outDir],
1269
- ["Processed Bundles", String(summary.processedFiles)],
1270
- ["Vaulted Source Maps", String(summary.movedSourceMaps)],
1271
- ["Cold Functions Protected", String(summary.totalColdFunctionsProtected)],
1272
- ["Hot Functions Skipped (0% Tax)", String(summary.totalHotFunctionsSkipped)],
1273
- ["Encrypted Strings", String(summary.totalEncryptedStrings)],
1274
- ["Mangled Symbols", String(summary.totalMangledSymbols)],
1275
- [
1276
- "Gzip Bundle Size",
1277
- `${formatBytes(summary.originalGzipBytes)} -> ${formatBytes(summary.protectedGzipBytes)} (${sign}${summary.gzipDeltaPercent}%)`
1278
- ],
1279
- ["Elapsed Time", `${summary.elapsedMs} ms`]
1280
- ];
1281
- const col1Width = Math.max(...rows.map(([k]) => k.length), 16);
1282
- const col2Width = Math.max(...rows.map(([, v]) => v.length), 20);
1283
- const divider = `+-${"-".repeat(col1Width)}-+-${"-".repeat(col2Width)}-+`;
1284
- console.log("\n[unpeek] Protection Complete");
1285
- console.log(divider);
1286
- for (const [label, value] of rows) {
1287
- console.log(`| ${label.padEnd(col1Width)} | ${value.padEnd(col2Width)} |`);
1352
+ const gzip = `${formatBytes(summary.originalGzipBytes)} -> ${formatBytes(summary.protectedGzipBytes)} ${sign}${summary.gzipDeltaPercent}%`;
1353
+ console.log("");
1354
+ console.log(brandBlock());
1355
+ console.log("");
1356
+ console.log(
1357
+ sectionBlock("PROJECT", [
1358
+ ["framework", summary.framework],
1359
+ ["output", summary.outDir],
1360
+ ["bundles", String(summary.processedFiles)]
1361
+ ])
1362
+ );
1363
+ console.log("");
1364
+ console.log(
1365
+ sectionBlock("CALL GRAPH", [
1366
+ ["hot path exempt", `${summary.totalHotFunctionsSkipped} ${dim("0% tax")}`],
1367
+ ["cold path protected", String(summary.totalColdFunctionsProtected)]
1368
+ ])
1369
+ );
1370
+ console.log("");
1371
+ console.log(
1372
+ sectionBlock("TRANSFORM", [
1373
+ ["string vault", `${summary.totalEncryptedStrings} literals ${dim("O(1) memo")}`],
1374
+ ["symbol mangling", `${summary.totalMangledSymbols} bindings`]
1375
+ ])
1376
+ );
1377
+ console.log("");
1378
+ console.log(
1379
+ sectionBlock("OUTPUT", [
1380
+ ["source maps", `${summary.movedSourceMaps} moved -> .unpeek-maps/`],
1381
+ ["gzip", gzip],
1382
+ ["elapsed", `${summary.elapsedMs} ms`]
1383
+ ])
1384
+ );
1385
+ console.log("");
1386
+ console.log(` ${dim("done. maps are private. hot path untouched.")}`);
1387
+ }
1388
+ function printInitResult(result, dryRun) {
1389
+ const postbuild = result.updatedPackageJson ? dryRun ? "would be added" : "unpeek protect (added)" : "already configured";
1390
+ const vault = result.updatedGitignore ? dryRun ? "would be ignored" : ".unpeek-maps/ (added)" : "already ignored";
1391
+ console.log("");
1392
+ console.log(brandBlock());
1393
+ console.log("");
1394
+ console.log(
1395
+ sectionBlock("PROJECT", [
1396
+ ["framework", result.framework ?? "unknown"],
1397
+ ["postbuild", postbuild],
1398
+ ["vault", vault]
1399
+ ])
1400
+ );
1401
+ console.log("");
1402
+ if (dryRun) {
1403
+ console.log(` ${dim(result.message)}`);
1404
+ } else if (result.updatedPackageJson || result.updatedGitignore) {
1405
+ console.log(` ${dim("postbuild wired. maps stay private from the first build.")}`);
1406
+ } else {
1407
+ console.log(` ${dim(result.message)}`);
1408
+ }
1409
+ if (!dryRun) {
1410
+ console.log(` ${dim("run your build to protect the first bundle.")}`);
1288
1411
  }
1289
- console.log(divider);
1290
1412
  }
1291
1413
  async function runCli(args) {
1292
1414
  if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
@@ -1301,7 +1423,7 @@ async function runCli(args) {
1301
1423
  if (command === "init") {
1302
1424
  const dryRun = args.includes("--dry-run");
1303
1425
  const res = initProject(process.cwd(), { dryRun });
1304
- console.log(`[unpeek] ${res.message}`);
1426
+ printInitResult(res, dryRun);
1305
1427
  return;
1306
1428
  }
1307
1429
  if (command === "protect" || args.length > 0 && args[0].startsWith("-")) {