nv-path-jpath
v0.0.3
Published
nv-path-jpath ============ - a special path format - for nv-pg-flat-json cli using
Downloads
2
Readme
nv-path-jpath
- a special path format
- for nv-pg-flat-json cli using
install
- npm install nv-path-jpath
usage
const x = require("nv-path-jpath")
example
const x = require("./index")
> r = x.parse(`a/b\\//c`)
Rslt { is_abs: false, pl: [ 'a', 'b\\/', 'c' ] }
>
> r.stringify()
'a/b\\//c'
>
> r.stringify_to_raw()
'"a/b\\\\//c"'
>
> x.parse_from_raw('"a/b\\\\//c"')
Rslt { is_abs: false, pl: [ 'a', 'b\\/', 'c' ] }
>
> r = x.parse(`a/b𝑒 e/c`)
Rslt { is_abs: false, pl: [ 'a', 'b𝑒 e', 'c' ] }
>
> r.stringify()
'a/b𝑒 e/c'
>
APIS
{
parse: [Function: parse] {
STATES: { init: 0, sp: 1, path: 2, esc: 3, eof: 4 }
},
parse_from_raw: [Function: parse_from_raw]
}
METHODS
r.stringify r.stringify_to_raw
r.is_abs r.pl
LICENSE
- ISC