partof
TypeScript icon, indicating that this package has built-in type declarations

3.0.7 • Public • Published

partof

partof verifies whether one object is part of an other.

Status

Category Status
Version npm
Dependencies David
Dev dependencies David
Build GitHub Actions
License GitHub

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

/partof/

    Package Sidebar

    Install

    npm i partof

    Weekly Downloads

    24,513

    Version

    3.0.7

    License

    MIT

    Unpacked Size

    7.77 kB

    Total Files

    12

    Last publish

    Collaborators

    • thenativeweb-admin
    • goloroden