Socket
Socket
Sign inDemoInstall

jest-validate

Package Overview
Dependencies
Maintainers
5
Versions
219
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-validate - npm Package Compare versions

Comparing version 21.0.2 to 21.1.0

35

build/condition.js

@@ -1,21 +0,22 @@

"use strict"; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default =
const toString = Object.prototype.toString;
const validationCondition = (option, validOption) => {
return (
option === null ||
option === undefined ||
toString.call(option) === toString.call(validOption));
};
module.exports = validationCondition;
validationCondition; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/const toString = Object.prototype.toString;function validationCondition(option, validOption) {return option === null || option === undefined || toString.call(option) === toString.call(validOption);
}

@@ -1,2 +0,2 @@

'use strict';var _deprecated;
'use strict';Object.defineProperty(exports, "__esModule", { value: true });var _deprecated;

@@ -18,5 +18,5 @@

function _load_condition() {return _condition = _interopRequireDefault(require('./condition'));}var _utils;
function _load_utils() {return _utils = require('./utils');}function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
function _load_utils() {return _utils = require('./utils');}function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}exports.default =
module.exports = {
{
comment: '',

@@ -23,0 +23,0 @@ condition: (_condition || _load_condition()).default,

@@ -1,2 +0,2 @@

'use strict';var _utils;
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.deprecationWarning = undefined;var _utils;

@@ -22,3 +22,3 @@

*/const deprecationMessage = (message, options) => {const comment = options.comment;const name = options.title && options.title.deprecation || (_utils || _load_utils()).DEPRECATION;(0, (_utils || _load_utils()).logValidationWarning)(name, message, comment);};
const deprecationWarning = (
const deprecationWarning = exports.deprecationWarning = (
config,

@@ -36,5 +36,2 @@ option,

return false;
};
module.exports = {
deprecationWarning };
};

@@ -1,2 +0,2 @@

'use strict';var _chalk;
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.errorMessage = undefined;var _chalk;

@@ -23,3 +23,3 @@

*
*/const errorMessage = (option, received, defaultValue, options) => {const message = ` Option ${(_chalk || _load_chalk()).default.bold(`"${option}"`)} must be of type:
*/const errorMessage = exports.errorMessage = (option, received, defaultValue, options) => {const message = ` Option ${(_chalk || _load_chalk()).default.bold(`"${option}"`)} must be of type:
${(_chalk || _load_chalk()).default.bold.green((0, (_jestGetType || _load_jestGetType()).default)(defaultValue))}

@@ -38,6 +38,2 @@ but instead received:

throw new (_utils || _load_utils()).ValidationError(name, message, comment);
};
module.exports = {
ValidationError: (_utils || _load_utils()).ValidationError,
errorMessage };
};

@@ -1,2 +0,2 @@

'use strict';
'use strict';Object.defineProperty(exports, "__esModule", { value: true });

@@ -35,2 +35,2 @@

*
*/module.exports = config;
*/exports.default = config;

@@ -11,19 +11,16 @@ 'use strict';var _utils;

function _load_utils() {return _utils = require('./utils');}var _errors;
function _load_errors() {return _errors = require('./errors');}var _validate;
function _load_validate() {return _validate = _interopRequireDefault(require('./validate'));}function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
function _load_utils() {return _utils = require('./utils');}var _validate;
module.exports = {
ValidationError: (_errors || _load_errors()).ValidationError,
createDidYouMeanMessage: (_utils || _load_utils()).createDidYouMeanMessage,
format: (_utils || _load_utils()).format,
logValidationWarning: (_utils || _load_utils()).logValidationWarning,
validate: (_validate || _load_validate()).default }; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
function _load_validate() {return _validate = _interopRequireDefault(require('./validate'));}function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/module.exports = { ValidationError: (_utils || _load_utils()).ValidationError, createDidYouMeanMessage: (_utils || _load_utils()).createDidYouMeanMessage, format: (_utils || _load_utils()).format, logValidationWarning: (_utils || _load_utils()).logValidationWarning, validate: (_validate || _load_validate()).default };

@@ -1,2 +0,2 @@

'use strict';var _chalk;
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.createDidYouMeanMessage = exports.logValidationWarning = exports.ValidationError = exports.format = exports.WARNING = exports.ERROR = exports.DEPRECATION = undefined;var _chalk;

@@ -23,3 +23,3 @@

*
*/const DEPRECATION = `${BULLET} Deprecation Warning`;const ERROR = `${BULLET} Validation Error`;const WARNING = `${BULLET} Validation Warning`;const format = value => typeof value === 'function' ? value.toString() : (0, (_prettyFormat || _load_prettyFormat()).default)(value, { min: true });
*/const DEPRECATION = exports.DEPRECATION = `${BULLET} Deprecation Warning`;const ERROR = exports.ERROR = `${BULLET} Validation Error`;const WARNING = exports.WARNING = `${BULLET} Validation Warning`;const format = exports.format = value => typeof value === 'function' ? value.toString() : (0, (_prettyFormat || _load_prettyFormat()).default)(value, { min: true });

@@ -36,6 +36,6 @@ class ValidationError extends Error {

Error.captureStackTrace(this, () => {});
}}
}}exports.ValidationError = ValidationError;
const logValidationWarning = (
const logValidationWarning = exports.logValidationWarning = (
name,

@@ -49,3 +49,3 @@ message,

const createDidYouMeanMessage = (
const createDidYouMeanMessage = exports.createDidYouMeanMessage = (
unrecognized,

@@ -60,11 +60,2 @@ allowedOptions) =>

return suggestion ? `Did you mean ${(_chalk || _load_chalk()).default.bold(format(suggestion))}?` : '';
};
module.exports = {
DEPRECATION,
ERROR,
ValidationError,
WARNING,
createDidYouMeanMessage,
format,
logValidationWarning };
};

@@ -1,2 +0,2 @@

'use strict';var _default_config;
'use strict';Object.defineProperty(exports, "__esModule", { value: true });var _default_config;

@@ -65,4 +65,4 @@

};
};exports.default =
module.exports = validate;
validate;

@@ -1,2 +0,2 @@

'use strict';var _chalk;
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.unknownOptionWarning = undefined;var _chalk;

@@ -21,3 +21,3 @@

const unknownOptionWarning = (
const unknownOptionWarning = exports.unknownOptionWarning = (
config,

@@ -51,2 +51,2 @@ exampleConfig,

*
*/module.exports = { unknownOptionWarning };
*/
{
"name": "jest-validate",
"version": "21.0.2",
"version": "21.1.0",
"repository": {

@@ -14,4 +14,4 @@ "type": "git",

"leven": "^2.1.0",
"pretty-format": "^21.0.2"
"pretty-format": "^21.1.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc