MCPcopy
hub / github.com/josdejong/mathjs / wordRegexp

Function wordRegexp

examples/code_editor/mathjs-lang.js:9–11  ·  view source on GitHub ↗
(words)

Source from the content-addressed store, hash-verified

7 */
8export function mathjsLang(math) {
9 function wordRegexp(words) {
10 return new RegExp('^((' + words.join(')|(') + '))\\b')
11 }
12
13 const singleOperators = new RegExp("^[-+*/&|^~<>!%']")
14 const singleDelimiters = new RegExp('^[([{},:=;.?]')

Callers 2

mathjsLangFunction · 0.85
tokenBaseFunction · 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…