MCPcopy Create free account
hub / github.com/browserify/static-module / isInAstralSet

Function isInAstralSet

bench/input.js:59–67  ·  view source on GitHub ↗
(code, set)

Source from the content-addressed store, hash-verified

57// assumption is that looking up astral identifier characters is
58// rare.
59function isInAstralSet(code, set) {
60 var pos = 0x10000;
61 for (var i = 0; i < set.length; i += 2) {
62 pos += set[i];
63 if (pos > code) { return false }
64 pos += set[i + 1];
65 if (pos >= code) { return true }
66 }
67}
68
69// Test whether a given character code starts an identifier.
70

Callers 2

isIdentifierStartFunction · 0.85
isIdentifierCharFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…