iteratify

0.0.1 • Public • Published

Written with StackEdit.

install

npm i iteratify --save

OR

yarn add iteratify

usage

const iteratify = require('iteratify');
let obj = {
	a: 1,
	b: /asd/,
	c: 'str'
};
iteratify(obj)
//or
obj = iteratify(obj);
console.log([...obj]);
// output
[
	{key: 'a', value: 1},
	{key: 'b', value: /asd/},
	{key: 'c', value: 'str'}
]
const iteratify = require('iteratify');
let obj = {
	a: 1,
	b: /asd/,
	c: 'str'
};
iteratify(obj, {labelKey: 'k', labelValue: 'v'});
console.log([...obj]);
// output
[
	{k: 'a', v: 1},
	{k: 'b', v: /asd/},
	{k: 'c', v: 'str'}
]

Readme

Keywords

Package Sidebar

Install

npm i iteratify

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

3.26 kB

Total Files

4

Last publish

Collaborators

  • xincici