mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-02-04 05:50:50 +00:00
nhj
more
This commit is contained in:
21
unified-ai-platform/node_modules/clone-deep/LICENSE
generated
vendored
Normal file
21
unified-ai-platform/node_modules/clone-deep/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2018, Jon Schlinkert.
|
||||
|
||||
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.
|
||||
49
unified-ai-platform/node_modules/clone-deep/index.js
generated
vendored
Normal file
49
unified-ai-platform/node_modules/clone-deep/index.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Module dependenices
|
||||
*/
|
||||
|
||||
const clone = require('shallow-clone');
|
||||
const typeOf = require('kind-of');
|
||||
const isPlainObject = require('is-plain-object');
|
||||
|
||||
function cloneDeep(val, instanceClone) {
|
||||
switch (typeOf(val)) {
|
||||
case 'object':
|
||||
return cloneObjectDeep(val, instanceClone);
|
||||
case 'array':
|
||||
return cloneArrayDeep(val, instanceClone);
|
||||
default: {
|
||||
return clone(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function cloneObjectDeep(val, instanceClone) {
|
||||
if (typeof instanceClone === 'function') {
|
||||
return instanceClone(val);
|
||||
}
|
||||
if (instanceClone || isPlainObject(val)) {
|
||||
const res = new val.constructor();
|
||||
for (let key in val) {
|
||||
res[key] = cloneDeep(val[key], instanceClone);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
function cloneArrayDeep(val, instanceClone) {
|
||||
const res = new val.constructor(val.length);
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
res[i] = cloneDeep(val[i], instanceClone);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Expose `cloneDeep`
|
||||
*/
|
||||
|
||||
module.exports = cloneDeep;
|
||||
81
unified-ai-platform/node_modules/clone-deep/package.json
generated
vendored
Normal file
81
unified-ai-platform/node_modules/clone-deep/package.json
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"name": "clone-deep",
|
||||
"description": "Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives.",
|
||||
"version": "4.0.1",
|
||||
"homepage": "https://github.com/jonschlinkert/clone-deep",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/clone-deep",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/clone-deep/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-plain-object": "^2.0.4",
|
||||
"kind-of": "^6.0.2",
|
||||
"shallow-clone": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^2.0.0",
|
||||
"mocha": "^5.2.0"
|
||||
},
|
||||
"keywords": [
|
||||
"array",
|
||||
"assign",
|
||||
"buffer",
|
||||
"clamped",
|
||||
"clone",
|
||||
"clone-array",
|
||||
"clone-array-deep",
|
||||
"clone-buffer",
|
||||
"clone-date",
|
||||
"clone-deep",
|
||||
"clone-map",
|
||||
"clone-object",
|
||||
"clone-object-deep",
|
||||
"clone-reg-exp",
|
||||
"clone-regex",
|
||||
"clone-regexp",
|
||||
"clone-set",
|
||||
"date",
|
||||
"deep",
|
||||
"extend",
|
||||
"mixin",
|
||||
"mixin-object",
|
||||
"object",
|
||||
"regex",
|
||||
"regexp",
|
||||
"shallow",
|
||||
"symbol"
|
||||
],
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"is-plain-object",
|
||||
"isobject",
|
||||
"kind-of",
|
||||
"shallow-clone"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user