array-functions
v0.0.0
Published
Read JS functions from JSON array.
Downloads
61
Readme
array-functions
Read JS functions from JSON array.
Install
$ npm install --save array-functions
Usage
import test from 'ava'
import arrayFunctions from './'
test('main', t => {
let json = [
['foo', 1, 2],
['bar', 1, 2]
]
json = arrayFunctions(json)
t.same(json, [
{
name: 'foo',
args: [1, 2]
},
{
name: 'bar',
args: [1, 2]
}
])
})
Related
- array-function: Like this module but return a single function
License
MIT © EGOIST