1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 05:40:05 +08:00
SpaceVim/docs/api/data/dict.md

1.0 KiB

title description
data#dict API data#dict API provides some basic functions and values for dict.

Available APIs >> data#dict

Intro

data#dict API provides some functions to manipulate a dict. Here is an example for using this api:

let s:DICT = SpaceVim#api#import('data#dict')

functions

name description
make(keys, values, ...) make dict from keys and values
swap(dict) swap keys and values of a dict
make_index(list, ...) make a index dict from a list
omit(dict, keys) remove keys in a dict
clear(dict) clear a dict
pick(dict, keys) pick keys from a dict
max_by(dict, expr) get max entry based on expr
min_by(dict, expr) get min entry based on expr