UNPKG
ocat-lang
Version:
latest (1.3.1)
1.3.1
1.3.0
1.2.0
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.3
1.0.2
1.0.1
0.8.0
0.7.3
0.7.2
0.7.1
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
A programming language for the web design and development
orangecatprog.com
luisRG-L/ocat-lang-npm
ocat-lang
/
src
/
runner
/
lexer
/
utils
/
isValue.ts
11 lines
(10 loc)
•
309 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
export
const
isValue
= (
word
:
string
) => !
isNaN
(
Number
(word)) || word.
match
(
/\b(true|false)\b/
) || word.
match
(
/\b(null)\b/
) || word.
startsWith
(
'"'
) || word.
endsWith
(
'"'
) || word.
startsWith
(
"'"
) || word.
endsWith
(
"'"
) || word.
startsWith
(
"`"
) || word.
endsWith
(
"`"
);