You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dev_fn.js 268B

1234567891011121314151617
  1. glob_u.fns.inc_map = function inc_map(map,key,dflt=0,inc=1){
  2. if (!map.has(key)){
  3. map.set(key,dflt + inc)
  4. } else {
  5. map.set(key,map.get(key) + inc)
  6. }
  7. }
  8. glob_u.fns.map_to_obj = function map_to_obj(m){
  9. var k,v
  10. var o={}
  11. for ([k,v] of m){
  12. o[k]=v
  13. }
  14. return o
  15. }