Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.0/argument/opts.ts";

Format key and value to construct string array.

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

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

Parameters

key: string
value: string | undefined

Returns

string[]