1.0.0 • Published 2 years ago
@jswork/text2kv v1.0.0
text2kv
Text array to kv list.
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.
1.0.0
2 years ago