Initial import with skill sheet working

This commit is contained in:
2024-12-04 00:11:23 +01:00
commit 9050c80ab4
4488 changed files with 671048 additions and 0 deletions

21
node_modules/each-props/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016-2022 Takayuki Sato <sttk.xslet@gmail.com>, Blaine Bublitz <blaine.bublitz@gmail.com>, and Eric Schoffstall <yo@contra.io>
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/each-props/README.md generated vendored Normal file
View File

@ -0,0 +1,119 @@
<p align="center">
<a href="http://gulpjs.com">
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
</a>
</p>
# each-props
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]
Processes each properties of an object deeply.
## Install
To install from npm:
```sh
$ npm i each-props --save
```
## Usage
Apply a function to all (non plain object) properties.
```js
const eachProps = require('each-props');
var obj = { a: 1, b: { c: 'CCC', d: { e: 'EEE' } } };
eachProps(obj, function (value, keyChain, nodeInfo) {
if (keyChain === 'a') {
nodeInfo.parent['a'] = value * 2;
} else if (keyChain === 'b.c') {
nodeInfo.parent['c'] = value.toLowerCase();
} else if (keyChain === 'b.d') {
return true; // stop to dig
} else if (keyChain === 'b.d.e') {
nodeInfo.parent['e'] = value.toLowerCase();
}
});
console.log(obj);
// => { a: 2, b: { c: 'ccc', d: { e: 'EEE' } } };
```
## API
### eachProps(obj, fn [, opts]) : void
Executes the _fn_ function for all properties.
#### Parameters:
| Parameter | Type | Description |
| :-------- | :------: | :--------------------------------------------- |
| _obj_ | object | A plain object to be treated. |
| _fn_ | function | A function to operate each properties. |
| _opts_ | object | An object to pass any data to each properties. |
- **API of _fn_ function**
#### fn(value, keyChain, nodeInfo) : boolean
This function is applied to all properties in an object.
##### Parameters:
| Parameter | Type | Description |
| :--------- | :----: | :------------------------------------------------------------------ |
| _value_ | any | A property value. |
| _keyChain_ | string | A string concatenating the hierarchical keys with dots. |
| _nodeInfo_ | object | An object which contains node informations (See [below][nodeinfo]). |
##### Returns:
True, if stops digging child properties.
**Type:** boolean
- ##### **Properties of _nodeInfo_**
| Properties | Type | Description |
| :--------- | :------: | :---------------------------------------------------------------------------------------------------------- |
| _name_ | string | The property name of this node. |
| _index_ | number | The index of the property among the sibling properties. |
| _count_ | number | The count of the sibling properties. |
| _depth_ | number | The depth of the property. |
| _parent_ | object | The parent node of the property. |
| _sort_ | function | A sort function which orders the child properties. This function is inherited from _opts_, if be specified. |
... and any properties inherited from _opts_.
- ##### **Properties of _opts_**
| Properties | Type | Description |
| :--------- | :------: | :----------------------------------------------------------------- |
| _sort_ | function | A sort function which orders the same level properties. (Optional) |
... and any properties you want to pass to each node.
## License
MIT
<!-- prettier-ignore-start -->
[downloads-image]: https://img.shields.io/npm/dm/each-props.svg?style=flat-square
[npm-url]: https://www.npmjs.org/package/each-props
[npm-image]: https://img.shields.io/npm/v/each-props.svg?style=flat-square
[ci-url]: https://github.com/gulpjs/each-props/actions?query=workflow:dev
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/each-props/dev?style=flat-square
[coveralls-url]: https://coveralls.io/r/gulpjs/each-props
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/each-props/master.svg
<!-- prettier-ignore-end -->
<!-- prettier-ignore-start -->
[nodeinfo]: #properties-of-nodeinfo
<!-- prettier-ignore-end -->

56
node_modules/each-props/index.js generated vendored Normal file
View File

@ -0,0 +1,56 @@
'use strict';
var isPlainObject = require('is-plain-object').isPlainObject;
var defaults = require('object.defaults/immutable');
module.exports = function (obj, fn, opts) {
if (!isObject(obj)) {
return;
}
if (typeof fn !== 'function') {
return;
}
if (!isPlainObject(opts)) {
opts = {};
}
forEachChild(obj, '', fn, 0, opts);
};
function forEachChild(node, baseKey, fn, depth, opts) {
var keys = Object.keys(node);
if (typeof opts.sort === 'function') {
var sortedKeys = opts.sort(keys);
if (Array.isArray(sortedKeys)) {
keys = sortedKeys;
}
}
depth += 1;
for (var i = 0, n = keys.length; i < n; i++) {
var key = keys[i];
var keyChain = baseKey + '.' + key;
var value = node[key];
var nodeInfo = defaults(opts);
nodeInfo.name = key;
nodeInfo.index = i;
nodeInfo.count = n;
nodeInfo.depth = depth;
nodeInfo.parent = node;
var notDigg = fn(value, keyChain.slice(1), nodeInfo);
if (notDigg || !isPlainObject(value)) {
continue;
}
forEachChild(value, keyChain, fn, depth, opts);
}
}
function isObject(v) {
return Object.prototype.toString.call(v) === '[object Object]';
}

50
node_modules/each-props/package.json generated vendored Normal file
View File

@ -0,0 +1,50 @@
{
"name": "each-props",
"version": "3.0.0",
"description": "Processes each properties of an object deeply.",
"author": "Gulp Team <team@gulpjs.com> (https://gulpjs.com/)",
"main": "index.js",
"files": [
"index.js",
"LICENSE"
],
"scripts": {
"lint": "eslint .",
"pretest": "npm run lint",
"test": "nyc mocha --async-only"
},
"repository": "gulpjs/each-props",
"keywords": [
"deep",
"each",
"object",
"property",
"properties",
"props"
],
"license": "MIT",
"engines": {
"node": ">= 10.13.0"
},
"nyc": {
"reporter": [
"lcov",
"text-summary"
]
},
"prettier": {
"singleQuote": true
},
"dependencies": {
"is-plain-object": "^5.0.0",
"object.defaults": "^1.1.0"
},
"devDependencies": {
"eslint": "^7.32.0",
"eslint-config-gulp": "^5.0.1",
"eslint-plugin-node": "^11.1.0",
"expect": "^27.5.1",
"mocha": "^8.4.0",
"nyc": "^15.1.0"
}
}