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:
44
unified-ai-platform/node_modules/jest-validate/build/condition.js
generated
vendored
Normal file
44
unified-ai-platform/node_modules/jest-validate/build/condition.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.getValues = getValues;
|
||||
exports.multipleValidOptions = multipleValidOptions;
|
||||
exports.validationCondition = validationCondition;
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const toString = Object.prototype.toString;
|
||||
const MULTIPLE_VALID_OPTIONS_SYMBOL = Symbol('JEST_MULTIPLE_VALID_OPTIONS');
|
||||
function validationConditionSingle(option, validOption) {
|
||||
return (
|
||||
option === null ||
|
||||
option === undefined ||
|
||||
(typeof option === 'function' && typeof validOption === 'function') ||
|
||||
toString.call(option) === toString.call(validOption)
|
||||
);
|
||||
}
|
||||
function getValues(validOption) {
|
||||
if (
|
||||
Array.isArray(validOption) &&
|
||||
// @ts-expect-error: no index signature
|
||||
validOption[MULTIPLE_VALID_OPTIONS_SYMBOL]
|
||||
) {
|
||||
return validOption;
|
||||
}
|
||||
return [validOption];
|
||||
}
|
||||
function validationCondition(option, validOption) {
|
||||
return getValues(validOption).some(e => validationConditionSingle(option, e));
|
||||
}
|
||||
function multipleValidOptions(...args) {
|
||||
const options = [...args];
|
||||
// @ts-expect-error: no index signature
|
||||
options[MULTIPLE_VALID_OPTIONS_SYMBOL] = true;
|
||||
return options;
|
||||
}
|
||||
37
unified-ai-platform/node_modules/jest-validate/build/defaultConfig.js
generated
vendored
Normal file
37
unified-ai-platform/node_modules/jest-validate/build/defaultConfig.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _condition = require('./condition');
|
||||
var _deprecated = require('./deprecated');
|
||||
var _errors = require('./errors');
|
||||
var _utils = require('./utils');
|
||||
var _warnings = require('./warnings');
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const validationOptions = {
|
||||
comment: '',
|
||||
condition: _condition.validationCondition,
|
||||
deprecate: _deprecated.deprecationWarning,
|
||||
deprecatedConfig: {},
|
||||
error: _errors.errorMessage,
|
||||
exampleConfig: {},
|
||||
recursive: true,
|
||||
// Allow NPM-sanctioned comments in package.json. Use a "//" key.
|
||||
recursiveDenylist: ['//'],
|
||||
title: {
|
||||
deprecation: _utils.DEPRECATION,
|
||||
error: _utils.ERROR,
|
||||
warning: _utils.WARNING
|
||||
},
|
||||
unknown: _warnings.unknownOptionWarning
|
||||
};
|
||||
var _default = validationOptions;
|
||||
exports.default = _default;
|
||||
0
unified-ai-platform/node_modules/jest-validate/build/deprecated.js
generated
vendored
Normal file
0
unified-ai-platform/node_modules/jest-validate/build/deprecated.js
generated
vendored
Normal file
Reference in New Issue
Block a user