Socket
Socket
Sign inDemoInstall

jest-validate

Package Overview
Dependencies
11
Maintainers
5
Versions
218
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 21.1.0 to 21.2.0

7

build/condition.js

@@ -12,12 +12,11 @@ "use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default =

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.
* 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;function validationCondition(option, validOption) {return option === null || option === undefined || toString.call(option) === toString.call(validOption);
}

@@ -12,3 +12,2 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });var _deprecated;

function _load_deprecated() {return _deprecated = require('./deprecated');}var _warnings;

@@ -36,7 +35,6 @@ function _load_warnings() {return _warnings = require('./warnings');}var _errors;

*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/

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

function _load_utils() {return _utils = require('./utils');} /**
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/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 = exports.deprecationWarning = (

@@ -24,0 +23,0 @@ config,

@@ -12,3 +12,2 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.errorMessage = undefined;var _chalk;

function _load_chalk() {return _chalk = _interopRequireDefault(require('chalk'));}var _jestGetType;

@@ -19,8 +18,8 @@ function _load_jestGetType() {return _jestGetType = _interopRequireDefault(require('jest-get-type'));}var _utils;

*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/const errorMessage = exports.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))}

@@ -27,0 +26,0 @@ but instead received:

@@ -12,3 +12,2 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });

const config = {

@@ -31,7 +30,6 @@ comment: ' A comment',

*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/exports.default = config;

@@ -10,3 +10,2 @@ 'use strict';var _utils;

function _load_utils() {return _utils = require('./utils');}var _validate;

@@ -21,7 +20,6 @@

*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/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 };

@@ -10,3 +10,2 @@ '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;

function _load_chalk() {return _chalk = _interopRequireDefault(require('chalk'));}var _prettyFormat;

@@ -19,8 +18,8 @@ function _load_prettyFormat() {return _prettyFormat = _interopRequireDefault(require('pretty-format'));}var _leven;

*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/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 });
*/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 });

@@ -27,0 +26,0 @@ class ValidationError extends Error {

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

function _load_default_config() {return _default_config = _interopRequireDefault(require('./default_config'));}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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/const _validate = (config, options) => {let hasDeprecationWarnings = false;for (const key in config) {if (options.deprecatedConfig && key in options.deprecatedConfig &&
*/const _validate = (config, options) => {let hasDeprecationWarnings = false;for (const key in config) {if (options.deprecatedConfig &&
key in options.deprecatedConfig &&
typeof options.deprecate === 'function')

@@ -24,0 +23,0 @@ {

@@ -12,3 +12,2 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.unknownOptionWarning = undefined;var _chalk;

function _load_chalk() {return _chalk = _interopRequireDefault(require('chalk'));}var _utils;

@@ -46,7 +45,6 @@ function _load_utils() {return _utils = require('./utils');}function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}

*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
{
"name": "jest-validate",
"version": "21.1.0",
"version": "21.2.0",
"repository": {

@@ -8,10 +8,10 @@ "type": "git",

},
"license": "BSD-3-Clause",
"license": "MIT",
"main": "build/index.js",
"dependencies": {
"chalk": "^2.0.1",
"jest-get-type": "^21.0.2",
"jest-get-type": "^21.2.0",
"leven": "^2.1.0",
"pretty-format": "^21.1.0"
"pretty-format": "^21.2.0"
}
}
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc