first commit

This commit is contained in:
2025-10-26 23:10:15 +08:00
commit 8f0345b7be
14961 changed files with 2356381 additions and 0 deletions

12
node_modules/@nodeutils/defaults-deep/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
"use strict";
var _ = require("lodash");
module.exports = function () {
var output = {};
_.toArray(arguments).reverse().forEach(function (item) {
_.mergeWith(output, item, function (objectValue, sourceValue) {
return _.isArray(sourceValue) ? sourceValue : undefined;
});
});
return output;
};

42
node_modules/@nodeutils/defaults-deep/package.json generated vendored Normal file
View File

@@ -0,0 +1,42 @@
{
"name": "@nodeutils/defaults-deep",
"version": "1.1.0",
"description": "Like lodash's _.defaultsDeep, but with array preservation",
"main": "lib/index.js",
"scripts": {
"test": "babel src -d lib && node ./node_modules/istanbul/lib/cli.js cover ./test/test.js -x ./test/test.js",
"build": "babel src -d lib",
"coverage": "ws -p 8888 -d coverage/lcov-report/"
},
"files": [
"lib"
],
"repository": {
"type": "git",
"url": "git+https://github.com/nodeutils/defaults-deep.git"
},
"keywords": [
"nodeutils",
"defaultsDeep",
"lodash",
"array",
"merge"
],
"author": "Drew Llewellyn <drew@drew.pro> (http://drew.pro)",
"license": "ISC",
"bugs": {
"url": "https://github.com/nodeutils/defaults-deep/issues"
},
"homepage": "https://github.com/nodeutils/defaults-deep#readme",
"devDependencies": {
"babel-cli": "^6.11.4",
"babel-preset-es2015": "^6.13.2",
"chai": "^3.5.0",
"istanbul": "^0.4.4",
"local-web-server": "^1.2.6",
"mocha": "^3.0.2"
},
"dependencies": {
"lodash": "^4.15.0"
}
}

49
node_modules/@nodeutils/defaults-deep/readme.md generated vendored Normal file
View File

@@ -0,0 +1,49 @@
# defaults-deep
## An individual component of the [[nodeutils package]](https://www.npmjs.com/package/nodeutils)
Similar to lodash's defaultsDeep, but without mutating the source object, and no merging of arrays.
## Installation
Install the package via `npm`:
```
$ npm install @nodeutils/defaults-deep --save
```
## Usage
#### Arguments
2. `[sources]` *(...Object)*: The source objects. Provide 2 or more, in descending order of importance
#### Returns
*(Object)*: Returns the merged objects
#### Example
```js
var defaultsDeep = require('@nodeutils/defaults-deep');
var objectA = { bar: { biz: { net: 'txi', qox: 'fuc' } }, qux: ['baz'] };
var objectB = { bar: { biz: { net: 'qux'} }, qux: ['biz', 'ban'] };
var objectC = { bar: { biz: { net: 'qux', lee: 'sox' } }, qux: ['biz', 'rep'], foo: 'bar' };
defaultsDeep(objectA, objectB, objectC);
// => { bar: { biz: { net: 'qux', qox: 'fuc', lee: 'sox' } }, qux: ['baz'], foo: 'bar' }
```
###How
Incredibly simple:
```js
"use strict";
const _ = require("lodash");
module.exports = function () {
let output = {};
_.toArray(arguments).reverse().forEach(item=> {
_.mergeWith(output, item, (objectValue, sourceValue) => {
return _.isArray(sourceValue) ? sourceValue : undefined;
});
});
return output;
};
```