Skip to content

Instantly share code, notes, and snippets.

@SomeoneWeird
Created October 22, 2015 09:03
Show Gist options
  • Save SomeoneWeird/eb2d18b851417b1f3c20 to your computer and use it in GitHub Desktop.
Save SomeoneWeird/eb2d18b851417b1f3c20 to your computer and use it in GitHub Desktop.
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var DELETEKEY = require("../lib/deleteKey");
function anyValidator(args, childValidators, data) {
if (data === undefined) {
if (args.opt) {
return DELETEKEY;
}
throw new Error("required Any value");
}
return data;
}
exports["default"] = {
name: "Any",
fn: anyValidator
};
module.exports = exports["default"];
"use strict";
const DELETEKEY = require("../lib/deleteKey");
function anyValidator(args, childValidators, data) {
if(data === undefined) {
if(args.opt) {
return DELETEKEY;
}
throw new Error("required Any value");
}
return data;
}
export default {
name: "Any",
fn: anyValidator
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment