MCPcopy Index your code
hub / github.com/Starcounter-Jack/JSON-Patch / isInteger

Function isInteger

module/helpers.mjs:60–73  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

58}
59//3x faster than cached /^\d+$/.test(str)
60export function isInteger(str) {
61 var i = 0;
62 var len = str.length;
63 var charCode;
64 while (i < len) {
65 charCode = str.charCodeAt(i);
66 if (charCode >= 48 && charCode <= 57) {
67 i++;
68 continue;
69 }
70 return false;
71 }
72 return true;
73}
74/**
75* Escapes a json pointer path
76* @param path The raw pointer

Callers 4

core.mjsFile · 0.90
applyOperationFunction · 0.90
core.tsFile · 0.90
applyOperationFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…