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

x/denops_std/argument/opts.ts>formatOpt

๐Ÿ“š Standard module for denops.vim
Latest
function formatOpt
import { formatOpt } from "https://deno.land/x/denops_std@v6.5.1/argument/opts.ts";

Format key and value to construct string array.

import type { Entrypoint } from "https://deno.land/x/denops_std@v6.5.1/mod.ts";
import { formatOpt } from "https://deno.land/x/denops_std@v6.5.1/argument/mod.ts";

export const main: Entrypoint = async (denops) => {
  console.log(formatOpt("enc", "sjis"));
  // "++enc=sjis"
}

Parameters

key: string
value: string | undefined

Returns

string[]