chore(package): re-init package with commitizen and standard-release

This commit is contained in:
Pavel Pertsev
2018-05-16 12:54:46 +03:00
parent cb4e7a5643
commit eaf2328575
10640 changed files with 609660 additions and 117 deletions

7
node_modules/is-subset/License.md generated vendored Normal file
View File

@@ -0,0 +1,7 @@
Copyright © 2015 Studio B12 GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

119
node_modules/is-subset/Readme.md generated vendored Normal file
View File

@@ -0,0 +1,119 @@
[![Coveralls test coverage
](https://img.shields.io/coveralls/studio-b12/is-subset.svg?style=flat-square)
](https://coveralls.io/r/studio-b12/is-subset)
[![Travis build status
](https://img.shields.io/travis/studio-b12/is-subset/master.svg?style=flat-square)
](https://travis-ci.org/studio-b12/is-subset)
[![David status of dependencies
](https://img.shields.io/david/studio-b12/is-subset.svg?style=flat-square)
](https://david-dm.org/studio-b12/is-subset)
[![Code style: airbnb
](https://img.shields.io/badge/code%20style-airbnb-blue.svg?style=flat-square)
](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

48
node_modules/is-subset/index.js generated vendored Normal file
View File

@@ -0,0 +1,48 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
/**
* 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.
*
* @param {Object} superset
* @param {Object} subset
*
* @returns {Boolean}
*
* @module is-subset
* @function default
* @alias isSubset
*/
var isSubset = (function (_isSubset) {
function isSubset(_x, _x2) {
return _isSubset.apply(this, arguments);
}
isSubset.toString = function () {
return _isSubset.toString();
};
return isSubset;
})(function (superset, subset) {
if (typeof superset !== 'object' || superset === null || (typeof subset !== 'object' || subset === null)) return false;
return Object.keys(subset).every(function (key) {
if (!superset.propertyIsEnumerable(key)) return false;
var subsetItem = subset[key];
var supersetItem = superset[key];
if (typeof subsetItem === 'object' && subsetItem !== null ? !isSubset(supersetItem, subsetItem) : supersetItem !== subsetItem) return false;
return true;
});
});
exports['default'] = isSubset;
module.exports = exports['default'];

1
node_modules/is-subset/module.js generated vendored Normal file
View File

@@ -0,0 +1 @@
export * from './module/index';

39
node_modules/is-subset/module/index.js generated vendored Normal file
View File

@@ -0,0 +1,39 @@
/**
* 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.
*
* @param {Object} superset
* @param {Object} subset
*
* @returns {Boolean}
*
* @module is-subset
* @function default
* @alias isSubset
*/
const isSubset = (superset, subset) => {
if (
(typeof superset !== 'object' || superset === null) ||
(typeof subset !== 'object' || subset === null)
) return false;
return Object.keys(subset).every((key) => {
if (!superset.propertyIsEnumerable(key)) return false;
const subsetItem = subset[key];
const supersetItem = superset[key];
if (
(typeof subsetItem === 'object' && subsetItem !== null) ?
!isSubset(supersetItem, subsetItem) :
supersetItem !== subsetItem
) return false;
return true;
});
};
export {isSubset as default};

52
node_modules/is-subset/package.json generated vendored Normal file
View File

@@ -0,0 +1,52 @@
{ "name": "is-subset"
, "version": "0.1.1"
, "description": "Check if an object is contained within another one"
, "dependencies":
{}
, "scripts":
{ "build": "cd module && babel --out-dir ../ *.js"
, "clean": "git reset && echo '/node_modules/' > .gitignore && git add .gitignore && git stash save --include-untracked --keep-index '`npm run clean` trash can' && git clean --force -d && git reset --hard && echo '\nclean: Uncommitted and ignored files have been moved to gits stash. To restore them run `git stash pop --quiet; git checkout .gitignore`.'"
, "coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls"
, "coverage": "isparta cover test.js"
, "develop": "nodangel --ignore node_modules --exec 'npm run test:lite'"
, "prepublish": "npm run clean && npm run build"
, "test": "jshint . && npm run test:lite"
, "test:lite": "babel-node test.js | tap-spec"
}
, "devDependencies":
{ "babel": "5.1.13"
, "coveralls": "2.11.2"
, "isparta": "3.0.3"
, "jshint": "2.7.0"
, "nodangel": "1.3.8"
, "tap-spec": "2.2.2"
, "tape-catch": "1.0.4"
}
, "files":
[ "/*.js"
, "/module/"
, "/test/"
, "/Readme.md"
, "/License.md"
]
, "license": "MIT"
, "keywords":
[ "contains"
, "contain"
, "object"
, "superset"
, "deep-equal"
, "equal"
]
, "author": "Tomek Wiszniewski <t.wiszniewski@gmail.com>"
, "repository":
{ "type": "git"
, "url": "git@github.com:studio-b12/is-subset.git"
}
}

207
node_modules/is-subset/test.js generated vendored Normal file
View File

@@ -0,0 +1,207 @@
import test from 'tape-catch';
import isSubset from './module';
test('Detects shallow subsets.', (is) => {
is.ok(isSubset(
{},
{}
), 'with empty objects'
);
is.ok(isSubset(
{a: 1},
{}
), 'with an empty subset'
);
is.ok(isSubset(
{a: 1, b: 2},
{a: 1, b: 2}
), 'with deep-equal objects'
);
is.ok(isSubset(
{a: 1, b: true, c: null, d: 'D', e: undefined, 'F-': 'anything'},
{a: 1, b: true, c: null, d: 'D', e: undefined, 'F-': 'anything'}
), 'with deep-equal objects of different kinds of values'
);
is.ok(isSubset(
{a: 1, b: 2},
{a: 1}
), 'with simple subsets'
);
is.end();
});
test('Detects shallow non-subsets.', (is) => {
is.notOk(isSubset(
{},
{a: 1}
), 'with an empty superset'
);
is.notOk(isSubset(
{a: 1},
{a: 2}
), 'with differences in values'
);
is.notOk(isSubset(
{a: 1},
{b: 1}
), 'with differences in keys'
);
is.notOk(isSubset(
{a: 1},
{a: 1, b: 2}
), 'with different sizes'
);
is.notOk(isSubset(
{a: 0},
{a: false}
), 'seeing the difference between falsey values'
);
is.notOk(isSubset(
{a: null},
{a: undefined}
), 'seeing the difference between null and undefined'
);
is.notOk(isSubset(
{a: 1},
{a: 1, b: undefined}
), 'seeing the difference between undefined reference and undefined value'
);
is.end();
});
test('Detects deep subsets.', (is) => {
is.ok(isSubset(
{a: {}},
{a: {}}
), 'with nested empty objects'
);
is.ok(isSubset(
{a: {}},
{}
), 'with an empty subset'
);
is.ok(isSubset(
{a: {b: 2}},
{a: {}}
), 'with a nested empty subset'
);
is.ok(isSubset(
{a: {b: 2}},
{a: {b: 2}}
), 'with deep-equal objects'
);
is.ok(isSubset(
{a: 1, b: true, c: null, d: 'D', e: undefined, 'F-': 'anything'},
{a: 1, b: true, c: null, d: 'D', e: undefined, 'F-': 'anything'}
), 'with deep-equal objects of different kinds of values'
);
is.ok(isSubset(
{a: 1, b: {c: 3, d: 4}, e: {f: {g: 7, h: {i: 9}}}},
{a: 1, b: {d: 4}, e: {f: {g: 7}}}
), 'with multiple levels of nesting'
);
is.end();
});
test('Detects deep non-subsets.', (is) => {
is.notOk(isSubset(
{a: {}},
{a: {b: 1}}
), 'with an empty object in the superset'
);
is.notOk(isSubset(
{a: {b: 2}},
{a: {b: 3}}
), 'with differences in values in a nested object'
);
is.notOk(isSubset(
{z: {a: 1}},
{z: {b: 1}}
), 'with differences in keys in a nested object'
);
is.notOk(isSubset(
{z: {a: 1}},
{z: {a: 1, b: 2}}
), 'with different sizes of a nested object'
);
is.end();
});
test('Works with array values.', (is) => {
is.ok(isSubset(
{a: []},
{a: []}
), 'treating empty arrays as equal'
);
is.ok(isSubset(
{a: [1]},
{a: [1]}
), 'treating equal arrays as equal'
);
is.notOk(isSubset(
{a: [1]},
{a: [1, 2]}
), 'detecting differences in length'
);
is.notOk(isSubset(
{a: [1]},
{a: [2]}
), 'detecting differences in values'
);
is.ok(isSubset(
{a: [1, 2, 3]},
{a: [1, 2]}
), 'treating array subsets as subsets'
);
is.notOk(isSubset(
{a: [1, 2, 3]},
{a: [1, 3]}
), ' only if the order is identical'
);
is.end();
});
test('Returns false for non-object “objects”.', (is) => {
is.notOk(isSubset(
'a',
{}
), 'for the superset'
);
is.notOk(isSubset(
{},
'a'
), 'for the subset'
);
is.end();
});