Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/vim/mod.ts>js_decode

๐Ÿ“š Standard module for denops.vim
Go to Latest
function js_decode
import { js_decode } from "https://deno.land/x/denops_std@v3.6.0/function/vim/mod.ts";

This is similar to |json_decode()| with these differences:

  • Object key names do not have to be in quotes.
  • Strings can be in single quotes.
  • Empty items in an array (between two commas) are allowed and result in v:none items. Can also be used as a |method|: ReadObject()->js_decode()

Parameters

denops: Denops
string: unknown

Returns

Promise<unknown>