Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function convert(schema) {
var newProps = Object.keys(validate.messages),
newSchema = false,
key;
newProps = newProps.concat(['description', 'dependencies']);
for (key in schema) {
if (newProps.indexOf(key) > 0) {
newSchema = true;
break;
}
}
if (!newSchema || schema.validator || schema.warning || typeof schema.empty !== 'undefined') {
schema.description = schema.message;
schema.message = schema.warning;
function convert(schema) {
var newProps = Object.keys(validate.messages),
newSchema = false,
key;
newProps = newProps.concat(['description', 'dependencies']);
for (key in schema) {
if (newProps.indexOf(key) > 0) {
newSchema = true;
break;
}
}
if (!newSchema || schema.validator || schema.warning || typeof schema.empty !== 'undefined') {
schema.description = schema.message;
schema.message = schema.warning;
function convert(schema) {
var newProps = Object.keys(validate.messages),
newSchema = false,
key;
newProps = newProps.concat(['description', 'dependencies']);
for (key in schema) {
if (newProps.indexOf(key) > 0) {
newSchema = true;
break;
}
}
if (!newSchema || schema.validator || schema.warning || typeof schema.empty !== 'undefined') {
schema.description = schema.message;
schema.message = schema.warning;
function convert(schema) {
var newProps = Object.keys(validate.messages),
newSchema = false,
key;
newProps = newProps.concat(['description', 'dependencies']);
for (key in schema) {
if (newProps.indexOf(key) > 0) {
newSchema = true;
break;
}
}
if (!newSchema || schema.validator || schema.warning || typeof schema.empty !== 'undefined') {
schema.description = schema.message;
schema.message = schema.warning;
function convert(schema) {
var newProps = Object.keys(validate.messages),
newSchema = false,
key;
newProps = newProps.concat(['description', 'dependencies']);
for (key in schema) {
if (newProps.indexOf(key) > 0) {
newSchema = true;
break;
}
}
if (!newSchema || schema.validator || schema.warning || typeof schema.empty !== 'undefined') {
schema.description = schema.message;
schema.message = schema.warning;
var convert = function (schema) {
var newSchema = false,
newProps = Object.keys(validate.messages);
newProps = newProps.concat(['description','dependencies']);
for (var key in schema) {
if (newProps.indexOf(key) > 0) {
newSchema = true;
break;
}
}
if (!newSchema || schema.validator ||
schema.warning || schema.empty != null
) {
schema.description = schema.message;
schema.message = schema.warning;
schema.pattern = schema.validator;
function convert(schema) {
var newProps = Object.keys(validate.messages),
newSchema = false,
key;
newProps = newProps.concat(['description', 'dependencies']);
for (key in schema) {
if (newProps.indexOf(key) > 0) {
newSchema = true;
break;
}
}
if (!newSchema || schema.validator || schema.warning || typeof schema.empty !== 'undefined') {
schema.description = schema.message;
schema.message = schema.warning;
function convert(schema) {
var newProps = Object.keys(validate.messages),
newSchema = false,
key;
newProps = newProps.concat(['description', 'dependencies']);
for (key in schema) {
if (newProps.indexOf(key) > 0) {
newSchema = true;
break;
}
}
if (!newSchema || schema.validator || schema.warning || typeof schema.empty !== 'undefined') {
schema.description = schema.message;
schema.message = schema.warning;
function convert(schema) {
var newProps = Object.keys(validate.messages),
newSchema = false,
key;
newProps = newProps.concat(['description', 'dependencies']);
for (key in schema) {
if (newProps.indexOf(key) > 0) {
newSchema = true;
break;
}
}
if (!newSchema || schema.validator || schema.warning || typeof schema.empty !== 'undefined') {
if(typeof schema.message !== 'undefined'){
schema.description = schema.message;
}