1.0.2 • Published 4 years ago
nv-facutil-jsidize
Licence
ISC
Version
1.0.2
Deps
2
Size
5 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated
nv-facutil-jsidize
- convert any string to a valid-js-identifier-name AND convet from valid-js-identifier-name to a string
- it is for converting lexical-binding-with-scope to a gloabl-var
- normally useless
rule
encode
if '
install
- npm install nv-facutil-jsidize
usage
const x = require("nv-facutil-jsidize");
example
without prefix
/*
> _s2id('a-b.c')
'a$LQ等等$Lg等等
with prefix
/*
> x.s2id('1ab')
'___1ab'
>
> x.s2id('1a.b')
'___1a$Lg等等$b'
>
> x.s2id('1#a')
'___1$Iw等等$a'
>
> x.id2s('___1ab')
'___1ab'
>
> x.id2s('___1a$Lg等等$b')
'___1a.b'
>
> x.id2s('___1$Iw等等$a')
'___1#a'
>
>
*/
API
{
DOLLAR: '$',
DASH: '$LQ等等
LICENSE
- ISC
: '
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__
example
without prefix
__CODE_BLOCK_2__
with prefix
__CODE_BLOCK_3__
API
__CODE_BLOCK_4__
LICENSE
- ISC
=> '$'
elif invalid-js-identifier-char : chars => __CODE_BLOCK_0__lt;eb64(chars)>$
else : do-nothing
eb64 is variant of base64
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__
example
without prefix
__CODE_BLOCK_2__
with prefix
__CODE_BLOCK_3__
API
__CODE_BLOCK_4__
LICENSE
- ISC
>
> let a$LQ等等$Lg等等$ = 999
> a$LQ等等$Lg等等$
999
> _id2s('a$LQ等等$b$Lg等等$c')
'a-b.c'
>
> _s2id('a b')
'a$ICAgICA等$b'
>
> let a$ICAgICA等$b =999
> a$ICAgICA等$b
999
>
> _id2s('a$ICAgICA等$b')
'a b'
>
> _s2id('a-b.c$#')
'a$LQ等等$b$Lg等等$c$$$Iw等等
with prefix
__CODE_BLOCK_3__
API
__CODE_BLOCK_4__
LICENSE
- ISC
: '
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__
example
without prefix
__CODE_BLOCK_2__
with prefix
__CODE_BLOCK_3__
API
__CODE_BLOCK_4__
LICENSE
- ISC
=> '$'
elif invalid-js-identifier-char : chars => __CODE_BLOCK_0__lt;eb64(chars)>$
else : do-nothing
eb64 is variant of base64
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__
example
without prefix
__CODE_BLOCK_2__
with prefix
__CODE_BLOCK_3__
API
__CODE_BLOCK_4__
LICENSE
- ISC
>
let a$LQ等等$b$Lg等等$c$$$Iw等等$ = 999
> a$LQ等等$b$Lg等等$c$$$Iw等等$
999
>
> _id2s('a$LQ等等$b$Lg等等$c$$$Iw等等
with prefix
__CODE_BLOCK_3__
API
__CODE_BLOCK_4__
LICENSE
- ISC
: '
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__
example
without prefix
__CODE_BLOCK_2__
with prefix
__CODE_BLOCK_3__
API
__CODE_BLOCK_4__
LICENSE
- ISC
=> '$'
elif invalid-js-identifier-char : chars => __CODE_BLOCK_0__lt;eb64(chars)>$
else : do-nothing
eb64 is variant of base64
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC
install
- npm install nv-facutil-jsidize
usage
__CODE_BLOCK_1__example
without prefix
__CODE_BLOCK_2__with prefix
__CODE_BLOCK_3__API
__CODE_BLOCK_4__LICENSE
- ISC