mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-02-04 14:00:49 +00:00
nhj
more
This commit is contained in:
29
unified-ai-platform/node_modules/@humanwhocodes/object-schema/LICENSE
generated
vendored
Normal file
29
unified-ai-platform/node_modules/@humanwhocodes/object-schema/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2019, Human Who Codes
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
7
unified-ai-platform/node_modules/@humanwhocodes/object-schema/src/index.js
generated
vendored
Normal file
7
unified-ai-platform/node_modules/@humanwhocodes/object-schema/src/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* @filedescription Object Schema Package
|
||||
*/
|
||||
|
||||
exports.ObjectSchema = require("./object-schema").ObjectSchema;
|
||||
exports.MergeStrategy = require("./merge-strategy").MergeStrategy;
|
||||
exports.ValidationStrategy = require("./validation-strategy").ValidationStrategy;
|
||||
53
unified-ai-platform/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js
generated
vendored
Normal file
53
unified-ai-platform/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* @filedescription Merge Strategy
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Class
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Container class for several different merge strategies.
|
||||
*/
|
||||
class MergeStrategy {
|
||||
|
||||
/**
|
||||
* Merges two keys by overwriting the first with the second.
|
||||
* @param {*} value1 The value from the first object key.
|
||||
* @param {*} value2 The value from the second object key.
|
||||
* @returns {*} The second value.
|
||||
*/
|
||||
static overwrite(value1, value2) {
|
||||
return value2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Merges two keys by replacing the first with the second only if the
|
||||
* second is defined.
|
||||
* @param {*} value1 The value from the first object key.
|
||||
* @param {*} value2 The value from the second object key.
|
||||
* @returns {*} The second value if it is defined.
|
||||
*/
|
||||
static replace(value1, value2) {
|
||||
if (typeof value2 !== "undefined") {
|
||||
return value2;
|
||||
}
|
||||
|
||||
return value1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Merges two properties by assigning properties from the second to the first.
|
||||
* @param {*} value1 The value from the first object key.
|
||||
* @param {*} value2 The value from the second object key.
|
||||
* @returns {*} A new object containing properties from both value1 and
|
||||
* value2.
|
||||
*/
|
||||
static assign(value1, value2) {
|
||||
return Object.assign({}, value1, value2);
|
||||
}
|
||||
}
|
||||
|
||||
exports.MergeStrategy = MergeStrategy;
|
||||
0
unified-ai-platform/node_modules/@humanwhocodes/object-schema/src/object-schema.js
generated
vendored
Normal file
0
unified-ai-platform/node_modules/@humanwhocodes/object-schema/src/object-schema.js
generated
vendored
Normal file
Reference in New Issue
Block a user