i-object

2.0.2 • Public • Published

i-object

Bro, does it even object?

It even does. It objects from an object, function, or array of objects, functions, and said arrays. Pass any of that stuff and get back a merged object.

Functions can return anything mentioned above. Recursive stuff happens and an object is produced. Don't think about it. Just pass stuff in, return stuff from functions, and get an object.

I object!

install

npm install i-object

example

const getObject = require('i-object')
 
getObject([
  {a: 123, b: 'b'},
  () => ({a: 456})
]) // -> {a: 456, b: 'b'}

API

getObject(input, args)

  • input: object, function, array input to be used to find objects
  • args: []: functions found within input will be called with these arguments
  • returns: object duh

See tests.

Dependencies (1)

Dev Dependencies (1)

Package Sidebar

Install

npm i i-object

Weekly Downloads

1

Version

2.0.2

License

CC0-1.0

Last publish

Collaborators

  • m59