Skip to content

afeiship/text2kv

Repository files navigation

text2kv

Text array to kv list.

version license size download

installation

npm install @jswork/text2kv

usage

import text2kv from '@jswork/text2kv';

const arr = ['a', 'b', 'c'];
const result = text2kv(arr);

/*
[
  { value: "a", label: "a" },
  { value: "b", label: "b" },
  { value: "c", label: "c" },
]
*/

license

Code released under the MIT license.

Releases

No releases published

Packages

No packages published