Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

object-manipulation

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-manipulation

nodejs object manipulation library

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

A quick and easy object manipulation library.

Object manipulators / interpreters

getDiffList(obj1, obj2, skipableRecursive)

obj1, and obj2, must be objects
skipableRecursive must be either a boolean or undefined

Parse an array of strings listing whether each part is new, old, updated, or equal.
skipableRecursive will stop the function from looping down into another layer
if there is an object with an object.

passNew(obj1, obj2, skipableRecursive)

Similar to getDiffList, but it will pass a object of which is only the new items

merge(obj1, obj2, recursive)

Will run though the two objects and merge objects 1 & 2 with 2 overwriting
object 1 where necessary.
recursive is default true

appendArray(firstArray, secondArray)

Will return an array with the content starting with input one and ending with input two. Example: ob.appendArray([1,2], [3,4]) //Will return [1,2,3,4]

appendBuffer(firstBuffer, secondBuffer)

This will do a similar task to appendArray, but with buffers.

firstUndefined(array)

This will return the first undefined value's index within an array

This will return an array of all indexes of the search term within the string


Other functions

isFunction(item)

Will parse a boolean on whether item is a function or not

isObject(item)

Will parse a boolean on whether item is a object {} or not

isArray(item)

Will parse a boolean on whether item is a array [] or not

Keywords

FAQs

Package last updated on 18 Jan 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc