UNPKG

estilo

Version:

Create color schemes for Vim, NeoVim, Airline and Lightline

18 lines (17 loc) 423 B
const uis = new Set(["u", "b", "r", "i", "c", "s"]); const uiValues = { u: "underline", b: "Bold", i: "Italic", r: "reverse", c: "undercurl", s: "standout", }; export function isLegacyUi(value) { return !value.split("").some((character) => { return !uis.has(character); }); } export function parseLegacyUi(style) { return style.split("").map((val) => uiValues[val]).join(","); }