Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

nv-dict-remove-with-function

ihgazni28ISC1.0.0

nv-dict-remove-with-function ============ - nv-dict-remove-with-function

readme

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