$ cnpm install partof
partof verifies whether one object is part of an other.
| Category | Status |
|---|---|
| Version | |
| Dependencies | |
| Dev dependencies | |
| Build | |
| License |
$ npm install partof
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
To run quality assurance for this module use roboter:
$ npx roboter
Copyright 2013 - present © cnpmjs.org | Home |