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

partof

Package Overview
Dependencies
Maintainers
5
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

partof

partof verifies whether one object is part of an other.

  • 3.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28K
increased by10.99%
Maintainers
5
Weekly downloads
 
Created
Source

partof

partof verifies whether one object is part of an other.

Status

CategoryStatus
Versionnpm
DependenciesDavid
Dev dependenciesDavid
BuildGitHub Actions
LicenseGitHub

Installation

$ npm install partof

Quick start

First you need to add a reference to partof in your application:

const { partOf } = require('partof');

If you use TypeScript, use the following code instead:

import { partOf } from 'partof';

To verify whether an object is part of an other, call the partOf function and provide the presumable subset as well as the superset object:

const potentialSubset = { foo: 'bar' },
      superset = { foo: 'bar', bas: 'baz' };

console.log(partOf(potentialSubset, superset));
// => true

Running quality assurance

To run quality assurance for this module use roboter:

$ npx roboter

Keywords

FAQs

Package last updated on 24 Aug 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