install.fairie/dotfiles/.vim/plugged/coc.nvim/autoload/coc/dict.vim
Git E2E Dev Test Username 49a294e830 git subrepo clone --branch=release https://github.com/neoclide/coc.nvim.git dotfiles/.vim/plugged/coc.nvim
subrepo:
  subdir:   "dotfiles/.vim/plugged/coc.nvim"
  merged:   "387b7850a"
upstream:
  origin:   "https://github.com/neoclide/coc.nvim.git"
  branch:   "release"
  commit:   "387b7850a"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"
2022-10-23 06:49:22 -04:00

32 lines
632 B
VimL

scriptencoding utf-8
function! coc#dict#equal(one, two) abort
for key in keys(a:one)
if a:one[key] != a:two[key]
return 0
endif
endfor
return 1
endfunction
" Return new dict with keys removed
function! coc#dict#omit(dict, keys) abort
let res = {}
for key in keys(a:dict)
if index(a:keys, key) == -1
let res[key] = a:dict[key]
endif
endfor
return res
endfunction
" Return new dict with keys only
function! coc#dict#pick(dict, keys) abort
let res = {}
for key in keys(a:dict)
if index(a:keys, key) != -1
let res[key] = a:dict[key]
endif
endfor
return res
endfunction