Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.1 KB

README.md

File metadata and controls

43 lines (33 loc) · 1.1 KB

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.