1.0.3 • Published 1 year ago
nv-lex-single-qstr v1.0.3
nv-lex-single-qstr
- same as JSON.parse(\<string>)
- just add support of \x@@ AND oct format \0.. \377
- for test \<sson> used in nvlang
install
- npm install nv-lex-single-qstr
splitted
usage
const x = require("nv-lex-single-qstr");
example
var code = '"a我\\x00你\\377\\09 它\\ud835\\udc52𝑒\\37"'
console.log(x._parse(code))
/*
SingleQcodes(2) [
34,
[
97, 25105, 0,
20320, 255, 0,
57, 32, 32,
23427, 119890, 119890,
31
]
]
*/
console.log(x.parse(code))
/*
"a我你ÿ9 它𝑒𝑒"
*/
var code = '`a我\\x00你\\377\\09 它 \\\" \\\' \\ud835\\udc52𝑒\\37`';
console.log(x._parse(code))
/*
SingleQcodes(2) [
96,
[
97, 25105, 0, 20320,
255, 0, 57, 32,
32, 23427, 32, 34,
32, 39, 32, 32,
119890, 119890, 31
]
]
*/
console.log(x.parse(code))
/*
a我你ÿ9 它 " ' 𝑒𝑒
*/
METHODS
APIS
LICENSE
- ISC