Socket
Book a DemoInstallSign in
Socket

i-object

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i-object

Put in array, object, function, be recursive about it, use parameters, get a merged object.

2.0.2
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

object

FAQs

Package last updated on 19 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.