1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 02:10:05 +08:00

docs(data#dict): update doc of data#dict api

This commit is contained in:
wsdjeg 2022-07-03 14:40:56 +08:00
parent 5b9ae1e168
commit 3dbb200fff

View File

@ -23,5 +23,12 @@ let s:DICT = SpaceVim#api#import('data#dict')
## functions
| name | description |
| ----------- | ------------------------------ |
| `make(str)` | make dict from keys and values |
| ------------------------- | ------------------------------ |
| `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 |