mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-18 08:13:39 -05:00
chore(package): re-init package with commitizen and standard-release
This commit is contained in:
119
node_modules/is-subset/Readme.md
generated
vendored
Normal file
119
node_modules/is-subset/Readme.md
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
[
|
||||
](https://coveralls.io/r/studio-b12/is-subset)
|
||||
[
|
||||
](https://travis-ci.org/studio-b12/is-subset)
|
||||
[
|
||||
](https://david-dm.org/studio-b12/is-subset)
|
||||
[
|
||||
](https://github.com/airbnb/javascript)
|
||||
|
||||
|
||||
|
||||
|
||||
is-subset
|
||||
=========
|
||||
|
||||
**Check if an object is contained within another one.**
|
||||
|
||||
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
```sh
|
||||
$ npm install is-subset
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
1) Import the module:
|
||||
|
||||
```js
|
||||
import isSubset from 'is-subset/module';
|
||||
|
||||
// …or:
|
||||
var isSubset = require('is-subset');
|
||||
```
|
||||
|
||||
2) These are true:
|
||||
|
||||
```js
|
||||
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:
|
||||
|
||||
```js
|
||||
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.
|
||||
|
||||
[specs]: ./test.js
|
||||
|
||||
|
||||
|
||||
|
||||
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][]
|
||||
|
||||
[MIT]: ./License.md
|
||||
[Studio B12 GmbH]: https://github.com/studio-b12
|
||||
Reference in New Issue
Block a user