0.0.1 • Published 2 years ago

nv-facutil-slject v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

nv-facutil-slject

  • simple-util for small-fixed-size AND selectable-data

install

  • npm install nv-facutil-slject

usage

example

    const {creat_opts} = require("nv-facutil-slject");

        var props = ['a','b',{'c':100},'d',3000]

        const {creat_opts} = require("./index")


        var opts = creat_opts(props)


        > opts.slcted_
        Symbol(noexist)
        > opts.slct_b()
        'b'
        > opts.slcted_
        'b'
        > opts.slct_c()
        100
        > opts.slcted_
        100
        > opts
        _Slject [100] { max: 1, always_ary: false, auto_rplc: true }
        >
        > opts.max=2
        2
        > opts.slct_d()
        [ 100, 'd' ]
        >
        > opts
        _Slject [[
          100,
          "d"
        ]] {
          max: 2,
          always_ary: false,
          auto_rplc: true
        }
        > opts.slcted_
        [ 100, 'd' ]
        >

LICENSE

  • ISC