nv-dict-replace-with-value

1.0.0 • Public • Published

nv-dict-replace-with-value

  • nv-dict-replace-with-value

install

  • npm install nv-dict-replace-with-value

usage

example

const {
    fst,
    fst_not,
    lst,
    lst_not,
    which,
    which_not,
    which_from_lst,
    which_not_from_lst,
    some,
    some_not,
    some_from_lst,
    some_not_from_lst,
    all,
    all_not
} = require("nv-dict-replace-with-value");


var d = {a:100,b:200,c:100,d:200}
all(d,'XX',100)
> d
{ a: 'XX', b: 200, c: 'XX', d: 200 }
>

var d = {a:100,b:200,c:100,d:200}
fst(d,'XX',100)
> d
{ a: 'XX', b: 200, c: 100, d: 200 }
>

var d = {a:100,b:200,c:100,d:200}
lst(d,'XX',100)
> d
{ a: 100, b: 200, c: 'XX', d: 200 }
>

API

  • dict_vrplc.fst(d,new_val,...cond_other_func_params)
  • dict_vrplc.fst_not(d,new_val,...cond_other_func_params)
  • dict_vrplc.which(d,index,new_val,...cond_other_func_params)
  • dict_vrplc.which_not(d,index,new_val,...cond_other_func_params)
  • dict_vrplc.which_from_lst(d,index,new_val,...cond_other_func_params)
  • dict_vrplc.which_not_from_lst(d,index,new_val,...cond_other_func_params)
  • dict_vrplc.lst(d,new_val,...cond_other_func_params)
  • dict_vrplc.lst_not(d,new_val,...cond_other_func_params)
  • dict_vrplc.some(d,whiches,new_val,...cond_other_func_params)
  • dict_vrplc.some_not(d,whiches,new_val,...cond_other_func_params)
  • dict_vrplc.some_from_lst(d,whiches,new_val,...cond_other_func_params)
  • dict_vrplc.some_not_from_lst(d,whiches,new_val,...cond_other_func_params)
  • dict_vrplc.all(d,new_val,...cond_other_func_params)
  • dict_vrplc.all_not(d,new_val,...cond_other_func_params)

LICENSE

  • ISC

Readme

Keywords

none

Package Sidebar

Install

npm i nv-dict-replace-with-value

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

4.79 kB

Total Files

3

Last publish

Collaborators

  • ihgazni2