Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/denops_std/function/nvim/mod.ts>msgpackdump

📚 Standard module for denops.vim
Go to Latest
function msgpackdump
import { msgpackdump } from "https://deno.land/x/denops_std@v3.6.0/function/nvim/mod.ts";

Convert a list of VimL objects to msgpack. Returned value is |readfile()|-style list. Example: call writefile(msgpackdump([{}]), 'fname.mpack', 'b') This will write the single 0x80 byte to fname.mpack file (dictionary with zero items is represented by 0x80 byte in messagepack). Limitations:

  1. |Funcref|s cannot be dumped.
  2. Containers that reference themselves cannot be dumped.
  3. Dictionary keys are always dumped as STR strings.
  4. Other strings are always dumped as BIN strings.
  5. Points 3. and 4. do not apply to |msgpack-special-dict|s.

Parameters

denops: Denops
list: unknown

Returns

Promise<unknown>