Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Distopico Vegan 9e639edc8d style: reformat indent 5 years ago
..
module style: reformat indent 5 years ago
License.md style: reformat indent 5 years ago
Readme.md style: reformat indent 5 years ago
index.js style: reformat indent 5 years ago
module.js style: reformat indent 5 years ago
package.json style: reformat indent 5 years ago
test.js style: reformat indent 5 years ago

Readme.md

Coveralls – test coverage Travis – build status David – status of dependencies Code style: airbnb

is-subset

Check if an object is contained within another one.

Installation

$ npm install is-subset

Usage

  1. Import the module:
import isSubset from 'is-subset/module';
// …or:
var isSubset = require('is-subset');
  1. These are true:
isSubset(
{a: 1, b: 2},
{a: 1}
);
isSubset(
{a: 1, b: {c: 3, d: 4}, e: 5},
{a: 1, b: {c: 3}}
);
isSubset(
{a: 1, bcd: [1, 2, 3]},
{a: 1, bcd: [1, 2]}
);

…and these are false:

isSubset(
{a: 1},
{a: 2}
);
isSubset(
{a: 1},
{a: 1, b: 2}
);
isSubset(
{a: 1, bcd: [1, 2, 3]},
{a: 1, bcd: [1, 3]}
);

See the specs for more info.

API

isSubset(superset, subset)

Check if an object is contained within another object.

Returns true if:

  • all enumerable keys of subset are also enumerable in superset, and
  • every value assigned to an enumerable key of subset strictly equals the value assigned to the same key of superset – or is a subset of it.

Parameters:

  • Object superset
  • Object subset

Return value:

  • Boolean

License

MIT © Studio B12 GmbH