nv-dict-remove-with-function

1.0.0 • Public • Published

nv-dict-remove-with-function

  • nv-dict-remove-with-function

install

  • npm install nv-dict-remove-with-function

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-remove-with-function");


var d = {a:100,b:200,c:300,d:400}
all(d,(v,k,i)=>v>250 || k==='b')
> d
{ a: 100 }

var d = {a:100,b:200,c:100,d:200}
fst(d,(v,k,i)=>v===100)
> d
{ b: 200, c: 100, d: 200 }
>

var d = {a:100,b:200,c:100,d:200}
lst(d,(v,k,i)=>v===100)
> d
{ a: 100, b: 200, d: 200 }
>

API

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

LICENSE

  • ISC

Readme

Keywords

none

Package Sidebar

Install

npm i nv-dict-remove-with-function

Weekly Downloads

2

Version

1.0.0

License

ISC

Unpacked Size

2.7 kB

Total Files

3

Last publish

Collaborators

  • ihgazni2