npm.io
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
) 'a-b.c$#' > */
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
, DOT: '$Lg等等

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
) 'a-b.c$#' > */
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
, HASH: '$Iw等等

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
) 'a-b.c$#' > */
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
, SPACE: '$IA等等

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
) 'a-b.c$#' > */
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
, _s2id: [Function: _s2id], (s:String):ValidJsIdentifierNameIgnoreStartNumChar s2id: [Function: s2id], (s,prefix='___'):ValidJsIdentifierName _id2s: [Function: _id2s], (id:ValidJsIdentifierNameIgnoreStartNumChar):String id2s: [Function: id2s] (id:ValidJsIdentifierName,prefix='___'):String }

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
) 'a-b.c$#' > */
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