Socket
Socket
Sign inDemoInstall

object-lib

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-lib

Various object utility functions


Version published
Weekly downloads
1.3K
increased by46.33%
Maintainers
1
Weekly downloads
 
Created
Source

object-lib

Build Status Test Coverage Dependabot Status Dependencies NPM Downloads Semantic-Release Gardener

Getting Started

$ npm install --save-dev object-lib

Functions

align(obj: Object, ref: Object)

Align the ordering of one object recursively to a reference object.

Example:

const { align } = require('object-lib');

const obj = { k1: 1, k2: 2 };
const ref = { k2: null, k1: null };

align(obj, ref);
// obj => { k2: 1, k1: 2 }

contain(tree: Object, subtree: Object)

Example:

const { contain } = require('object-lib');

contain({ a: [1, 2], b: 'c' }, { a: [1, 2] });
// => true

contain({ a: [1, 2], b: 'c' }, { a: [1] });
// => false

Keywords

FAQs

Package last updated on 23 Jan 2021

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