Skip to content
Browse files

Release 0.4.4

  • Loading branch information...
1 parent 6368366 commit 36f13f6816213ef2889a883fef314ad97793c80a @Baggz committed
Showing with 2,065 additions and 23 deletions.
  1. +1 −1 README.md
  2. +1 −1 package.json
  3. +2,016 −0 releases/0.4.4/amanda.js
  4. +26 −0 releases/0.4.4/amanda.min.js
  5. +4 −4 releases/latest/amanda.js
  6. +17 −17 releases/latest/amanda.min.js
View
2 README.md
@@ -111,7 +111,7 @@ Releases for the browser are available for download from GitHub.
| **Version** | **Description** | **Size** | **Action** |
|:------------|:----------------|:---------|:-----------|
| `amanda.js` | *uncompressed, with comments* | 36 KB (7.16 KB gzipped) | [Download](https://raw.github.com/Baggz/Amanda/master/releases/latest/amanda.js) |
-| `amanda.min.js` | *compressed, without comments* | 13.58 KB (3.94 KB gzipped) | [Download](https://raw.github.com/Baggz/Amanda/master/releases/latest/amanda.min.js) |
+| `amanda.min.js` | *compressed, without comments* | 13.59 KB (3.95 KB gzipped) | [Download](https://raw.github.com/Baggz/Amanda/master/releases/latest/amanda.min.js) |
Or you can use [JAM](http://jamjs.org/).
View
2 package.json
@@ -2,7 +2,7 @@
"name": "amanda",
"description": "JSON Schema validator",
- "version": "0.4.3",
+ "version": "0.4.4",
"author": "František Hába <hello@frantisekhaba.com>",
"devDependencies": {
View
2,016 releases/0.4.4/amanda.js
2,016 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
26 releases/0.4.4/amanda.min.js
@@ -0,0 +1,26 @@
+(function(){var n={},j=function(a,b,c){var d=function(a,b){if(h(a)&&!m(a))for(var c=0,e=a.length;c<e;c++)b.apply(a,[c,a[c]]);if(g(a)&&!m(a))for(var d in a)a.hasOwnProperty(d)&&b.apply(a,[d,a[d]])},e=function(a,b,c){var e=[],d=function(a,d){var f=e.length+1;e.push(function(){return b(a,d,function(a){var b=e[f];return!a&&b?b():!a&&!b?c():c(a)})})};if(h(a)&&!m(a))for(var f=0,s=a.length;f<s;f++)d(f,a[f]);else if(g(a)&&!m(a))for(f in a)a.hasOwnProperty(f)&&d(f,a[f]);else return c();return e[0]()};return"undefined"===
+typeof c?d.apply(this,arguments):e.apply(this,arguments)},B=function(a,b,c){return Array.prototype.filter.apply(a,[b,c||this])},h=function(a){return"[object Array]"===Object.prototype.toString.call(a)},C=function(a){return"boolean"===typeof a},t=function(a){return"undefined"!==typeof a},m=function(a){if(p(a))return!1;if(null===a)return!0;if(h(a)||"string"===typeof a)return 0===a.length;if(g(a))for(var b in a)if(hasOwnProperty.call(a,b))return!1;return!0},w=function(a,b){if(h(a,b))return a.length!==
+b.length?!1:Array.prototype.every.apply(a,[function(a,c){return b[c]===a}]);if(g(a,b)){var c=Object.keys(a),d=Object.keys(b);if(!w(c,d))return!1;for(key in a)if(!b[key]||a[key]!==b[key])return!1;return!0}return!1},u=function(a){return"function"===typeof a},x=function(a){return p(a)&&0===a%1},D=function(a){return null===a},p=function(a){return"number"===typeof a},g=function(a){return"[object Object]"===Object.prototype.toString.call(a)},k=function(a){return"string"===typeof a},v=function(a){return"undefined"===
+typeof a},y=function(a,b){for(var c in b)b.hasOwnProperty(c)&&!a.hasOwnProperty(c)&&(a[c]=b[c]);return a},z=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++){var f=a[d][b];-1===c.indexOf(f)&&c.push(f)}return c},E=function(){return!0},f=function(a){var b=this,c={singleError:!0,messages:F,cache:!1};j(c,function(d,e){b[d]=g(e)&&a[d]?y(a[d],c[d]):g(e)&&!a[d]?y({},c[d]):t(a[d])?a[d]:c[d]});this.errors=new r(this)};f.prototype.attributes={};f.prototype.addAttribute=function(a,b){return f.prototype.attributes[a]=
+b};f.prototype.addAttributeConstructor=function(a,b){return f.prototype.attributes[a]=b()};f.prototype.addAttribute("additionalProperties",function(a,b,c,d,e){var f=this;if(!0===c)return e();var l=Object.keys(b),l=B(l,function(a){return!d.properties[a]});if(m(l))return e();if(!1===c)return l.forEach(function(c){this.addError({property:this.joinPath(a,c),propertyValue:b[c]})},this),e();if(g(c))return j(l,function(d,e,l){return f.validateSchema(b[e],c,a+e,l)},e)});f.prototype.addAttribute("divisibleBy",
+function(a,b,c,d,e){if(0===c)throw Error("The value of this attribute should not be 0.");p(b)&&0!==b%c&&this.addError();return e()});f.prototype.addAttribute("enum",function(a,b,c,d,e){-1===c.indexOf(b)&&this.addError();return e()});f.prototype.addAttribute("except",function(a,b,c,d,e){-1!==c.indexOf(b)&&this.addError();return e()});f.prototype.addAttributeConstructor("format",function(){var a={"date-time":{type:"string",pattern:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/},
+date:function(a){return k(a)?a.match(/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}$/):g(a)?"[object Date]"===Object.prototype.toString.call(a):!1},time:{type:"string",pattern:/^\d{2}:\d{2}:\d{2}$/},"utc-milisec":{type:"number"},regex:function(a){return a&&a.test&&a.exec},color:{type:"string"},style:{type:"string"},phone:{type:"number"},uri:{type:"string",pattern:/^(?:(?:ht|f)tp(?:s?)\:\/\/|~\/|\/)?(?:\w+:\w+@)?((?:(?:[-\w\d{1-3}]+\.)+(?:com|org|cat|coop|int|pro|tel|xxx|net|gov|mil|biz|info|mobi|name|aero|jobs|edu|co\.uk|ac\.uk|it|fr|tv|museum|asia|local|travel|[a-z]{2})?)|((\b25[0-5]\b|\b[2][0-4][0-9]\b|\b[0-1]?[0-9]?[0-9]\b)(\.(\b25[0-5]\b|\b[2][0-4][0-9]\b|\b[0-1]?[0-9]?[0-9]\b)){3}))(?::[\d]{1,5})?(?:(?:(?:\/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|\/)+|\?|#)?(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?:#(?:[-\w~!$ |\/.,*:;=]|%[a-f\d]{2})*)?$/},
+email:{type:"string",pattern:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/},"ip-address":{type:"string",pattern:/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/},ipv6:{type:"string",pattern:/(?:(?:[a-f\d]{1,4}:)*(?:[a-f\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(?:(?:[a-f\d]{1,4}:)*[a-f\d]{1,4})?::(?:(?:[a-f\d]{1,4}:)*(?:[a-f\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))?)/},
+"host-name":{type:"string"},alpha:{required:!0,type:"string",pattern:/^[a-zA-Z]+$/},alphanumeric:{required:!0,type:["string","number"],pattern:/^[a-zA-Z0-9]+$/},decimal:function(a){return!p(a)?!1:(a+"").match(/^[0-9]+(\.[0-9]{1,2})?$/)},percentage:{required:!0,type:["string","number"],pattern:/^-?[0-9]{0,2}(\.[0-9]{1,2})?$|^-?(100)(\.[0]{1,2})?$/,minimum:-100,maximum:100},port:{required:!0,type:["string","number"],pattern:/\:\d+/}};j({url:"uri",ip:"ip-address",ipv4:"ip-address",host:"host-name",hostName:"host-name"},
+function(b,c){a[b]=a[c]});return function(b,c,d,e,f){if(g(d))return this.validateProperty(b,c,d,f);if(k(d)&&!Object.prototype.hasOwnProperty.apply(a,[d]))throw Error("The format \u2018"+d+"\u2019 is not supported.");if(k(d)){d=a[d];if(u(d))return d(c)||this.addError(),f();if(g(d))return this.validateProperty(b,c,d,f)}}});f.prototype.addAttribute("length",function(a,b,c,d,e){k(b)&&b.length!==c&&this.addError();return e()});f.prototype.addAttribute("maximum",function(a,b,c,d,e){p(b)&&(d.exclusiveMaximum&&
+b>=c||b>c)&&this.addError();return e()});f.prototype.addAttribute("maxItems",function(a,b,c,d,e){h(b)&&b.length>c&&this.addError();return e()});f.prototype.addAttribute("maxLength",function(a,b,c,d,e){k(b)&&b.length>c&&this.addError();return e()});f.prototype.addAttribute("minimum",function(a,b,c,d,e){p(b)&&(d.exclusiveMinimum&&b<=c||b<c)&&this.addError();return e()});f.prototype.addAttribute("minItems",function(a,b,c,d,e){h(b)&&b.length<c&&this.addError();return e()});f.prototype.addAttribute("minLength",
+function(a,b,c,d,e){k(b)&&b.length<c&&this.addError();return e()});f.prototype.addAttribute("pattern",function(a,b,c,d,e){k(b)&&!b.match(c)&&this.addError();return e()});f.prototype.addAttribute("patternProperties",function(a,b,c,d,e){var f=this;if(m(c))return e();var l={},A=Object.keys(c);j(b,function(a){j(A,function(b,e){a.match(RegExp(e))&&(l[a]=c[e])})});if(m(l))return e();j(l,function(c,e,d){return f.validateSchema(b[c],e,f.joinPath(a,c),d)},e)});f.prototype.addAttribute("required",function(a,
+b,c,d,e){c&&(a=v(b),b=(k(b)||h(b)||g(b))&&m(b),(a||b)&&this.addError());return e()});f.prototype.addAttributeConstructor("type",function(){var a={string:k,number:p,"function":u,"boolean":C,object:g,array:h,integer:x,"int":x,"null":D,any:E};return function(b,c,d,e,f){if(h(d))d.some(function(b){if(!Object.prototype.hasOwnProperty.apply(a,[b]))throw Error("Type \u2018"+d+"\u2019 is not supported.");return a[b](c)})||this.addError();else{if(!Object.prototype.hasOwnProperty.apply(a,[d]))throw Error("Type \u2018"+
+d+"\u2019 is not supported.");a[d](c)||this.addError()}return f()}});f.prototype.addAttribute("uniqueItems",function(a,b,c,d,e){var f=this;j(b,function(c,e){k(e)&&b.indexOf(e)<c&&f.addError();(g(e)||h(e))&&b.forEach(function(b,d){d!==c&&w(e,b)&&f.addError({property:f.joinPath(a,d)})})});return e()});var r=function(a){this.length=0;this.errorMessages=a.messages};r.prototype.renderErrorMessage=function(a){var b=this.errorMessages[a.attributeName];return b&&u(b)?b(a.property,a.propertyValue,a.attributeValue):
+b&&k(b)?(["property","propertyValue","attributeValue"].forEach(function(c){b=b.replace(RegExp("{{"+c+"}}","g"),a[c])}),b=b.replace(/{{validator}}/g,a.attributeValue),b.replace(/\s+/g," ")):a.message};r.prototype.push=function(a){this[this.length]={property:a.property,propertyValue:a.propertyValue,attributeName:a.attributeName,attributeValue:a.attributeValue,message:this.renderErrorMessage(a),validator:a.attributeName,validatorName:a.attributeName,validatorValue:a.attributeValue};this.length+=1};r.prototype.getProperties=
+function(){return z(this,"property")};r.prototype.getMessages=function(){return z(this,"message")};var F={required:function(a){return"The \u2018"+a+"\u2019 property is required."},minLength:function(a,b,c){return["The "+a+" property must be at least "+c+" characters.","The length of the property is "+b.length+"."].join(" ")},maxLength:function(a,b,c){return["The "+a+" property must not exceed "+c+" character"+(1<c?"s":"")+".","The length of the property is "+b.length+"."].join(" ")},length:function(a,
+b,c){return["The "+a+" property must be exactly "+c+" character"+(1<c?"s":"")+".","The length of the property is "+b.length+"."].join(" ")},format:function(a,b,c){return["The \u2018"+a+"\u2019 property must be a/an \u2018"+c+"\u2019.","The current value of the property is \u2018"+b+"\u2019"].join(" ")},type:function(a,b,c){return["The \u2018"+a+"\u2019 property must be "+(-1<"aeiou".indexOf(c[0])?"an":"a")+" \u2018"+c+"\u2019.","The type of the property is \u2018"+typeof b+"\u2019"].join(" ")},except:function(){},
+minimum:function(a,b,c){return["The minimum value of the \u2018"+a+"\u2019 must be "+c+".","The current value of the property is \u2018"+b+"\u2019"].join(" ")},maximum:function(a,b,c){return["The maximum value of the \u2018"+a+"\u2019 must be "+c+".","The current value of the property is \u2018"+b+"\u2019."].join(" ")},pattern:function(a,b,c){return"The \u2018"+a+"\u2019 does not match the \u2018"+c+"\u2019 pattern."},maxItems:function(a,b,c){return["The \u2018"+a+"\u2019 property must not contain more than \u2018"+
+c+"\u2019 items.","Currently it contains \u2018"+b.items+"\u2019 items."].join(" ")},minItems:function(a,b,c){return["The \u2018"+a+"\u2019 property must contain at least \u2018"+c+"\u2019 items.","Currently it contains \u2018"+b.items+"\u2019 items."].join(" ")},divisibleBy:function(a,b,c){return"The \u2018"+a+"\u2019 is not divisible by \u2018"+c+"\u2019."},uniqueItems:function(a){return"All items in the \u2018"+a+"\u2019 property must be unique."},"enum":function(a,b,c){return"Value of the \u2018"+
+a+"\u2019 must be "+c.join(" or ")+"."}};f.prototype.getProperty=function(a,b){if(b)return t(b[a])?b[a]:void 0};f.prototype.joinPath=function(a,b){a=a||"";b+="";return b.match(/^[a-zA-Z][a-zA-Z0-9]*$/)?a?a+"."+b:b:b.match(/\d+/)?a+"["+b+"]":a+'["'+b+'"]'};f.prototype.validate=function(a,b,c){var d=this;this.instance=a;this.schema=b;var e=function(){return 0!==d.errors.length?c(d.errors):c()};if(-1!=="string number function boolean integer int null".split(" ").indexOf(b.type))return this.validateProperty(void 0,
+a,b,e);if(-1!==["object","array"].indexOf(b.type)){if(k(a))try{a=JSON.parse(a)}catch(f){}return this.validateSchema(a,b,"",e)}if("any"===b.type||!b.type){if(k(a))try{return a=JSON.parse(a),this.validateSchema(a,b,"",e)}catch(l){}return g(a)||h(a)?this.validateSchema(a,b,"",e):this.validateProperty(void 0,a,b,e)}};f.prototype.validateItems=function(a,b,c,d){var e=this;return h(b.items)?v(b.additionalItems)||!0===b.additionalItems?j(b.items,function(b,d,f){return e.validateSchema(a[b],d,e.joinPath(c,
+b),f)},d):j(a,function(a,d,f){if(b.items[a]||g(b.additionalItems))return e.validateSchema(d,b.items[a],e.joinPath(c,a),f);if(!1===b.additionalItems)return e.errors.push({property:e.joinPath(c,a),propertyValue:d,attributeName:"additionalItems",attributeValue:!1}),f()},d):g(b.items)&&a&&!m(a)?j(a,function(d,f,g){return e.validateSchema(a[d],b.items,e.joinPath(c,d),g)},d):d()};f.prototype.validateProperties=function(a,b,c,d){var e=this;return j(b.properties,function(d,f,g){var k="object"===f.type&&f.properties,
+h="array"===f.type,j=e.getProperty(d,a),s=e.joinPath(c,d);return k||h?e.validateSchema(j,b.properties[d],s,g):e.validateProperty(s,j,f,g)},d)};f.prototype.validateProperty=function(a,b,c,d){var e=this,f={};"validateItems validateProperties validateSchema validateProperty getProperty attributes errors joinPath".split(" ").forEach(function(a){f[a]=this[a]},e);return!0!==c.required&&v(b)?d():j(e.attributes,function(d,j,h){var m=e.errors.length;f.addError=function(f){return g(f)?e.errors.push({property:f.property||
+a,propertyValue:f.propertyValue||b,attributeName:f.attributeName||d,attributeValue:f.attributeValue||c[d],message:f.message||void 0}):e.errors.push({property:a,propertyValue:b,attributeName:d,attributeValue:c[d],message:f})};var n=function(a){return!0===a||k(a)?(f.addError(a),h(!0)):e.errors.length>m&&e.singleError?h(!0):h()};return t(c[d])?j.apply(f,[a,b,c[d],c,n]):h()},d)};f.prototype.validateSchema=function(a,b,c,d){var e=this;return e.validateProperty(c,a,b,function(){return b.properties?e.validateProperties(a,
+b,c,d):b.items?e.validateItems(a,b,c,d):d()})};n.json={validate:function(a,b,c,d){"function"===typeof c&&(d=c,c={});return(new f(c)).validate(a,b,d)},addAttribute:function(a,b){return f.prototype.addAttribute.apply(f,arguments)},addAttributeConstructor:function(a,b){return f.prototype.addAttributeConstructor.apply(f,arguments)}};var q=function(a){if(!Object.prototype.hasOwnProperty.apply(n,[a]))throw Error("The \u2018"+a+"\u2019 engine is not supported. Please use a different one.");return n[a]};
+q.validate=function(a,b,c,d){var e=n.json;return e.validate.apply(e,arguments)};q.addValidator=function(a,b){var c=n.json;return c.addAttribute.apply(c,arguments)};q.addAttribute=function(a,b){var c=n.json;return c.addAttribute.apply(c,arguments)};q.addAttributeConstructor=function(a,b){var c=n.json;return c.addAttributeConstructor.apply(c,arguments)};"undefined"!==typeof module&&module.exports?module.exports=q:"undefined"!==typeof define?define(function(){return q}):this.amanda=q})();
View
8 releases/latest/amanda.js
@@ -1074,7 +1074,7 @@ var typeConstructor = function typeConstructor() {
});
if (!noError) {
- this.errors.addError();
+ this.addError();
}
return callback();
@@ -1432,12 +1432,12 @@ errorMessages = {
/**
* GetProperty
*
- * @param {string} property
+ * @param {string} property
* @param {object} source
*/
Validation.prototype.getProperty = function(property, source) {
if (source) {
- return (source[property]) ? source[property] : undefined;
+ return (isDefined(source[property])) ? source[property] : undefined;
} else {
return undefined;
}
@@ -1446,7 +1446,7 @@ Validation.prototype.getProperty = function(property, source) {
/**
* JoinPath
*
- * @param {string} path
+ * @param {string} path
* @param {string} property
*/
Validation.prototype.joinPath = function(path, property) {
View
34 releases/latest/amanda.min.js
@@ -1,26 +1,26 @@
(function(){var n={},j=function(a,b,c){var d=function(a,b){if(h(a)&&!m(a))for(var c=0,e=a.length;c<e;c++)b.apply(a,[c,a[c]]);if(g(a)&&!m(a))for(var d in a)a.hasOwnProperty(d)&&b.apply(a,[d,a[d]])},e=function(a,b,c){var e=[],d=function(a,d){var f=e.length+1;e.push(function(){return b(a,d,function(a){var b=e[f];return!a&&b?b():!a&&!b?c():c(a)})})};if(h(a)&&!m(a))for(var f=0,s=a.length;f<s;f++)d(f,a[f]);else if(g(a)&&!m(a))for(f in a)a.hasOwnProperty(f)&&d(f,a[f]);else return c();return e[0]()};return"undefined"===
-typeof c?d.apply(this,arguments):e.apply(this,arguments)},A=function(a,b,c){return Array.prototype.filter.apply(a,[b,c||this])},h=function(a){return"[object Array]"===Object.prototype.toString.call(a)},B=function(a){return"boolean"===typeof a},m=function(a){if(p(a))return!1;if(null===a)return!0;if(h(a)||"string"===typeof a)return 0===a.length;if(g(a))for(var b in a)if(hasOwnProperty.call(a,b))return!1;return!0},v=function(a,b){if(h(a,b))return a.length!==b.length?!1:Array.prototype.every.apply(a,
-[function(a,c){return b[c]===a}]);if(g(a,b)){var c=Object.keys(a),d=Object.keys(b);if(!v(c,d))return!1;for(key in a)if(!b[key]||a[key]!==b[key])return!1;return!0}return!1},t=function(a){return"function"===typeof a},w=function(a){return p(a)&&0===a%1},C=function(a){return null===a},p=function(a){return"number"===typeof a},g=function(a){return"[object Object]"===Object.prototype.toString.call(a)},k=function(a){return"string"===typeof a},u=function(a){return"undefined"===typeof a},x=function(a,b){for(var c in b)b.hasOwnProperty(c)&&
-!a.hasOwnProperty(c)&&(a[c]=b[c]);return a},y=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++){var f=a[d][b];-1===c.indexOf(f)&&c.push(f)}return c},D=function(){return!0},f=function(a){var b=this,c={singleError:!0,messages:E,cache:!1};j(c,function(d,e){b[d]=g(e)&&a[d]?x(a[d],c[d]):g(e)&&!a[d]?x({},c[d]):"undefined"!==typeof a[d]?a[d]:c[d]});this.errors=new r(this)};f.prototype.attributes={};f.prototype.addAttribute=function(a,b){return f.prototype.attributes[a]=b};f.prototype.addAttributeConstructor=
-function(a,b){return f.prototype.attributes[a]=b()};f.prototype.addAttribute("additionalProperties",function(a,b,c,d,e){var f=this;if(!0===c)return e();var l=Object.keys(b),l=A(l,function(a){return!d.properties[a]});if(m(l))return e();if(!1===c)return l.forEach(function(c){this.addError({property:this.joinPath(a,c),propertyValue:b[c]})},this),e();if(g(c))return j(l,function(d,e,l){return f.validateSchema(b[e],c,a+e,l)},e)});f.prototype.addAttribute("divisibleBy",function(a,b,c,d,e){if(0===c)throw Error("The value of this attribute should not be 0.");
-p(b)&&0!==b%c&&this.addError();return e()});f.prototype.addAttribute("enum",function(a,b,c,d,e){-1===c.indexOf(b)&&this.addError();return e()});f.prototype.addAttribute("except",function(a,b,c,d,e){-1!==c.indexOf(b)&&this.addError();return e()});f.prototype.addAttributeConstructor("format",function(){var a={"date-time":{type:"string",pattern:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/},date:function(a){return k(a)?a.match(/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}$/):g(a)?"[object Date]"===
-Object.prototype.toString.call(a):!1},time:{type:"string",pattern:/^\d{2}:\d{2}:\d{2}$/},"utc-milisec":{type:"number"},regex:function(a){return a&&a.test&&a.exec},color:{type:"string"},style:{type:"string"},phone:{type:"number"},uri:{type:"string",pattern:/^(?:(?:ht|f)tp(?:s?)\:\/\/|~\/|\/)?(?:\w+:\w+@)?((?:(?:[-\w\d{1-3}]+\.)+(?:com|org|cat|coop|int|pro|tel|xxx|net|gov|mil|biz|info|mobi|name|aero|jobs|edu|co\.uk|ac\.uk|it|fr|tv|museum|asia|local|travel|[a-z]{2})?)|((\b25[0-5]\b|\b[2][0-4][0-9]\b|\b[0-1]?[0-9]?[0-9]\b)(\.(\b25[0-5]\b|\b[2][0-4][0-9]\b|\b[0-1]?[0-9]?[0-9]\b)){3}))(?::[\d]{1,5})?(?:(?:(?:\/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|\/)+|\?|#)?(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?:#(?:[-\w~!$ |\/.,*:;=]|%[a-f\d]{2})*)?$/},
+typeof c?d.apply(this,arguments):e.apply(this,arguments)},B=function(a,b,c){return Array.prototype.filter.apply(a,[b,c||this])},h=function(a){return"[object Array]"===Object.prototype.toString.call(a)},C=function(a){return"boolean"===typeof a},t=function(a){return"undefined"!==typeof a},m=function(a){if(p(a))return!1;if(null===a)return!0;if(h(a)||"string"===typeof a)return 0===a.length;if(g(a))for(var b in a)if(hasOwnProperty.call(a,b))return!1;return!0},w=function(a,b){if(h(a,b))return a.length!==
+b.length?!1:Array.prototype.every.apply(a,[function(a,c){return b[c]===a}]);if(g(a,b)){var c=Object.keys(a),d=Object.keys(b);if(!w(c,d))return!1;for(key in a)if(!b[key]||a[key]!==b[key])return!1;return!0}return!1},u=function(a){return"function"===typeof a},x=function(a){return p(a)&&0===a%1},D=function(a){return null===a},p=function(a){return"number"===typeof a},g=function(a){return"[object Object]"===Object.prototype.toString.call(a)},k=function(a){return"string"===typeof a},v=function(a){return"undefined"===
+typeof a},y=function(a,b){for(var c in b)b.hasOwnProperty(c)&&!a.hasOwnProperty(c)&&(a[c]=b[c]);return a},z=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++){var f=a[d][b];-1===c.indexOf(f)&&c.push(f)}return c},E=function(){return!0},f=function(a){var b=this,c={singleError:!0,messages:F,cache:!1};j(c,function(d,e){b[d]=g(e)&&a[d]?y(a[d],c[d]):g(e)&&!a[d]?y({},c[d]):t(a[d])?a[d]:c[d]});this.errors=new r(this)};f.prototype.attributes={};f.prototype.addAttribute=function(a,b){return f.prototype.attributes[a]=
+b};f.prototype.addAttributeConstructor=function(a,b){return f.prototype.attributes[a]=b()};f.prototype.addAttribute("additionalProperties",function(a,b,c,d,e){var f=this;if(!0===c)return e();var l=Object.keys(b),l=B(l,function(a){return!d.properties[a]});if(m(l))return e();if(!1===c)return l.forEach(function(c){this.addError({property:this.joinPath(a,c),propertyValue:b[c]})},this),e();if(g(c))return j(l,function(d,e,l){return f.validateSchema(b[e],c,a+e,l)},e)});f.prototype.addAttribute("divisibleBy",
+function(a,b,c,d,e){if(0===c)throw Error("The value of this attribute should not be 0.");p(b)&&0!==b%c&&this.addError();return e()});f.prototype.addAttribute("enum",function(a,b,c,d,e){-1===c.indexOf(b)&&this.addError();return e()});f.prototype.addAttribute("except",function(a,b,c,d,e){-1!==c.indexOf(b)&&this.addError();return e()});f.prototype.addAttributeConstructor("format",function(){var a={"date-time":{type:"string",pattern:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/},
+date:function(a){return k(a)?a.match(/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}$/):g(a)?"[object Date]"===Object.prototype.toString.call(a):!1},time:{type:"string",pattern:/^\d{2}:\d{2}:\d{2}$/},"utc-milisec":{type:"number"},regex:function(a){return a&&a.test&&a.exec},color:{type:"string"},style:{type:"string"},phone:{type:"number"},uri:{type:"string",pattern:/^(?:(?:ht|f)tp(?:s?)\:\/\/|~\/|\/)?(?:\w+:\w+@)?((?:(?:[-\w\d{1-3}]+\.)+(?:com|org|cat|coop|int|pro|tel|xxx|net|gov|mil|biz|info|mobi|name|aero|jobs|edu|co\.uk|ac\.uk|it|fr|tv|museum|asia|local|travel|[a-z]{2})?)|((\b25[0-5]\b|\b[2][0-4][0-9]\b|\b[0-1]?[0-9]?[0-9]\b)(\.(\b25[0-5]\b|\b[2][0-4][0-9]\b|\b[0-1]?[0-9]?[0-9]\b)){3}))(?::[\d]{1,5})?(?:(?:(?:\/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|\/)+|\?|#)?(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?:#(?:[-\w~!$ |\/.,*:;=]|%[a-f\d]{2})*)?$/},
email:{type:"string",pattern:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/},"ip-address":{type:"string",pattern:/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/},ipv6:{type:"string",pattern:/(?:(?:[a-f\d]{1,4}:)*(?:[a-f\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(?:(?:[a-f\d]{1,4}:)*[a-f\d]{1,4})?::(?:(?:[a-f\d]{1,4}:)*(?:[a-f\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))?)/},
"host-name":{type:"string"},alpha:{required:!0,type:"string",pattern:/^[a-zA-Z]+$/},alphanumeric:{required:!0,type:["string","number"],pattern:/^[a-zA-Z0-9]+$/},decimal:function(a){return!p(a)?!1:(a+"").match(/^[0-9]+(\.[0-9]{1,2})?$/)},percentage:{required:!0,type:["string","number"],pattern:/^-?[0-9]{0,2}(\.[0-9]{1,2})?$|^-?(100)(\.[0]{1,2})?$/,minimum:-100,maximum:100},port:{required:!0,type:["string","number"],pattern:/\:\d+/}};j({url:"uri",ip:"ip-address",ipv4:"ip-address",host:"host-name",hostName:"host-name"},
-function(b,c){a[b]=a[c]});return function(b,c,d,e,f){if(g(d))return this.validateProperty(b,c,d,f);if(k(d)&&!Object.prototype.hasOwnProperty.apply(a,[d]))throw Error("The format \u2018"+d+"\u2019 is not supported.");if(k(d)){d=a[d];if(t(d))return d(c)||this.addError(),f();if(g(d))return this.validateProperty(b,c,d,f)}}});f.prototype.addAttribute("length",function(a,b,c,d,e){k(b)&&b.length!==c&&this.addError();return e()});f.prototype.addAttribute("maximum",function(a,b,c,d,e){p(b)&&(d.exclusiveMaximum&&
+function(b,c){a[b]=a[c]});return function(b,c,d,e,f){if(g(d))return this.validateProperty(b,c,d,f);if(k(d)&&!Object.prototype.hasOwnProperty.apply(a,[d]))throw Error("The format \u2018"+d+"\u2019 is not supported.");if(k(d)){d=a[d];if(u(d))return d(c)||this.addError(),f();if(g(d))return this.validateProperty(b,c,d,f)}}});f.prototype.addAttribute("length",function(a,b,c,d,e){k(b)&&b.length!==c&&this.addError();return e()});f.prototype.addAttribute("maximum",function(a,b,c,d,e){p(b)&&(d.exclusiveMaximum&&
b>=c||b>c)&&this.addError();return e()});f.prototype.addAttribute("maxItems",function(a,b,c,d,e){h(b)&&b.length>c&&this.addError();return e()});f.prototype.addAttribute("maxLength",function(a,b,c,d,e){k(b)&&b.length>c&&this.addError();return e()});f.prototype.addAttribute("minimum",function(a,b,c,d,e){p(b)&&(d.exclusiveMinimum&&b<=c||b<c)&&this.addError();return e()});f.prototype.addAttribute("minItems",function(a,b,c,d,e){h(b)&&b.length<c&&this.addError();return e()});f.prototype.addAttribute("minLength",
-function(a,b,c,d,e){k(b)&&b.length<c&&this.addError();return e()});f.prototype.addAttribute("pattern",function(a,b,c,d,e){k(b)&&!b.match(c)&&this.addError();return e()});f.prototype.addAttribute("patternProperties",function(a,b,c,d,e){var f=this;if(m(c))return e();var l={},z=Object.keys(c);j(b,function(a){j(z,function(b,e){a.match(RegExp(e))&&(l[a]=c[e])})});if(m(l))return e();j(l,function(c,e,d){return f.validateSchema(b[c],e,f.joinPath(a,c),d)},e)});f.prototype.addAttribute("required",function(a,
-b,c,d,e){c&&(a=u(b),b=(k(b)||h(b)||g(b))&&m(b),(a||b)&&this.addError());return e()});f.prototype.addAttributeConstructor("type",function(){var a={string:k,number:p,"function":t,"boolean":B,object:g,array:h,integer:w,"int":w,"null":C,any:D};return function(b,c,d,e,f){if(h(d))d.some(function(b){if(!Object.prototype.hasOwnProperty.apply(a,[b]))throw Error("Type \u2018"+d+"\u2019 is not supported.");return a[b](c)})||this.errors.addError();else{if(!Object.prototype.hasOwnProperty.apply(a,[d]))throw Error("Type \u2018"+
-d+"\u2019 is not supported.");a[d](c)||this.addError()}return f()}});f.prototype.addAttribute("uniqueItems",function(a,b,c,d,e){var f=this;j(b,function(c,e){k(e)&&b.indexOf(e)<c&&f.addError();(g(e)||h(e))&&b.forEach(function(b,d){d!==c&&v(e,b)&&f.addError({property:f.joinPath(a,d)})})});return e()});var r=function(a){this.length=0;this.errorMessages=a.messages};r.prototype.renderErrorMessage=function(a){var b=this.errorMessages[a.attributeName];return b&&t(b)?b(a.property,a.propertyValue,a.attributeValue):
+function(a,b,c,d,e){k(b)&&b.length<c&&this.addError();return e()});f.prototype.addAttribute("pattern",function(a,b,c,d,e){k(b)&&!b.match(c)&&this.addError();return e()});f.prototype.addAttribute("patternProperties",function(a,b,c,d,e){var f=this;if(m(c))return e();var l={},A=Object.keys(c);j(b,function(a){j(A,function(b,e){a.match(RegExp(e))&&(l[a]=c[e])})});if(m(l))return e();j(l,function(c,e,d){return f.validateSchema(b[c],e,f.joinPath(a,c),d)},e)});f.prototype.addAttribute("required",function(a,
+b,c,d,e){c&&(a=v(b),b=(k(b)||h(b)||g(b))&&m(b),(a||b)&&this.addError());return e()});f.prototype.addAttributeConstructor("type",function(){var a={string:k,number:p,"function":u,"boolean":C,object:g,array:h,integer:x,"int":x,"null":D,any:E};return function(b,c,d,e,f){if(h(d))d.some(function(b){if(!Object.prototype.hasOwnProperty.apply(a,[b]))throw Error("Type \u2018"+d+"\u2019 is not supported.");return a[b](c)})||this.addError();else{if(!Object.prototype.hasOwnProperty.apply(a,[d]))throw Error("Type \u2018"+
+d+"\u2019 is not supported.");a[d](c)||this.addError()}return f()}});f.prototype.addAttribute("uniqueItems",function(a,b,c,d,e){var f=this;j(b,function(c,e){k(e)&&b.indexOf(e)<c&&f.addError();(g(e)||h(e))&&b.forEach(function(b,d){d!==c&&w(e,b)&&f.addError({property:f.joinPath(a,d)})})});return e()});var r=function(a){this.length=0;this.errorMessages=a.messages};r.prototype.renderErrorMessage=function(a){var b=this.errorMessages[a.attributeName];return b&&u(b)?b(a.property,a.propertyValue,a.attributeValue):
b&&k(b)?(["property","propertyValue","attributeValue"].forEach(function(c){b=b.replace(RegExp("{{"+c+"}}","g"),a[c])}),b=b.replace(/{{validator}}/g,a.attributeValue),b.replace(/\s+/g," ")):a.message};r.prototype.push=function(a){this[this.length]={property:a.property,propertyValue:a.propertyValue,attributeName:a.attributeName,attributeValue:a.attributeValue,message:this.renderErrorMessage(a),validator:a.attributeName,validatorName:a.attributeName,validatorValue:a.attributeValue};this.length+=1};r.prototype.getProperties=
-function(){return y(this,"property")};r.prototype.getMessages=function(){return y(this,"message")};var E={required:function(a){return"The \u2018"+a+"\u2019 property is required."},minLength:function(a,b,c){return["The "+a+" property must be at least "+c+" characters.","The length of the property is "+b.length+"."].join(" ")},maxLength:function(a,b,c){return["The "+a+" property must not exceed "+c+" character"+(1<c?"s":"")+".","The length of the property is "+b.length+"."].join(" ")},length:function(a,
+function(){return z(this,"property")};r.prototype.getMessages=function(){return z(this,"message")};var F={required:function(a){return"The \u2018"+a+"\u2019 property is required."},minLength:function(a,b,c){return["The "+a+" property must be at least "+c+" characters.","The length of the property is "+b.length+"."].join(" ")},maxLength:function(a,b,c){return["The "+a+" property must not exceed "+c+" character"+(1<c?"s":"")+".","The length of the property is "+b.length+"."].join(" ")},length:function(a,
b,c){return["The "+a+" property must be exactly "+c+" character"+(1<c?"s":"")+".","The length of the property is "+b.length+"."].join(" ")},format:function(a,b,c){return["The \u2018"+a+"\u2019 property must be a/an \u2018"+c+"\u2019.","The current value of the property is \u2018"+b+"\u2019"].join(" ")},type:function(a,b,c){return["The \u2018"+a+"\u2019 property must be "+(-1<"aeiou".indexOf(c[0])?"an":"a")+" \u2018"+c+"\u2019.","The type of the property is \u2018"+typeof b+"\u2019"].join(" ")},except:function(){},
minimum:function(a,b,c){return["The minimum value of the \u2018"+a+"\u2019 must be "+c+".","The current value of the property is \u2018"+b+"\u2019"].join(" ")},maximum:function(a,b,c){return["The maximum value of the \u2018"+a+"\u2019 must be "+c+".","The current value of the property is \u2018"+b+"\u2019."].join(" ")},pattern:function(a,b,c){return"The \u2018"+a+"\u2019 does not match the \u2018"+c+"\u2019 pattern."},maxItems:function(a,b,c){return["The \u2018"+a+"\u2019 property must not contain more than \u2018"+
c+"\u2019 items.","Currently it contains \u2018"+b.items+"\u2019 items."].join(" ")},minItems:function(a,b,c){return["The \u2018"+a+"\u2019 property must contain at least \u2018"+c+"\u2019 items.","Currently it contains \u2018"+b.items+"\u2019 items."].join(" ")},divisibleBy:function(a,b,c){return"The \u2018"+a+"\u2019 is not divisible by \u2018"+c+"\u2019."},uniqueItems:function(a){return"All items in the \u2018"+a+"\u2019 property must be unique."},"enum":function(a,b,c){return"Value of the \u2018"+
-a+"\u2019 must be "+c.join(" or ")+"."}};f.prototype.getProperty=function(a,b){if(b)return b[a]?b[a]:void 0};f.prototype.joinPath=function(a,b){a=a||"";b+="";return b.match(/^[a-zA-Z][a-zA-Z0-9]*$/)?a?a+"."+b:b:b.match(/\d+/)?a+"["+b+"]":a+'["'+b+'"]'};f.prototype.validate=function(a,b,c){var d=this;this.instance=a;this.schema=b;var e=function(){return 0!==d.errors.length?c(d.errors):c()};if(-1!=="string number function boolean integer int null".split(" ").indexOf(b.type))return this.validateProperty(void 0,
-a,b,e);if(-1!==["object","array"].indexOf(b.type)){if(k(a))try{a=JSON.parse(a)}catch(f){}return this.validateSchema(a,b,"",e)}if("any"===b.type||!b.type){if(k(a))try{return a=JSON.parse(a),this.validateSchema(a,b,"",e)}catch(l){}return g(a)||h(a)?this.validateSchema(a,b,"",e):this.validateProperty(void 0,a,b,e)}};f.prototype.validateItems=function(a,b,c,d){var e=this;return h(b.items)?u(b.additionalItems)||!0===b.additionalItems?j(b.items,function(b,d,f){return e.validateSchema(a[b],d,e.joinPath(c,
+a+"\u2019 must be "+c.join(" or ")+"."}};f.prototype.getProperty=function(a,b){if(b)return t(b[a])?b[a]:void 0};f.prototype.joinPath=function(a,b){a=a||"";b+="";return b.match(/^[a-zA-Z][a-zA-Z0-9]*$/)?a?a+"."+b:b:b.match(/\d+/)?a+"["+b+"]":a+'["'+b+'"]'};f.prototype.validate=function(a,b,c){var d=this;this.instance=a;this.schema=b;var e=function(){return 0!==d.errors.length?c(d.errors):c()};if(-1!=="string number function boolean integer int null".split(" ").indexOf(b.type))return this.validateProperty(void 0,
+a,b,e);if(-1!==["object","array"].indexOf(b.type)){if(k(a))try{a=JSON.parse(a)}catch(f){}return this.validateSchema(a,b,"",e)}if("any"===b.type||!b.type){if(k(a))try{return a=JSON.parse(a),this.validateSchema(a,b,"",e)}catch(l){}return g(a)||h(a)?this.validateSchema(a,b,"",e):this.validateProperty(void 0,a,b,e)}};f.prototype.validateItems=function(a,b,c,d){var e=this;return h(b.items)?v(b.additionalItems)||!0===b.additionalItems?j(b.items,function(b,d,f){return e.validateSchema(a[b],d,e.joinPath(c,
b),f)},d):j(a,function(a,d,f){if(b.items[a]||g(b.additionalItems))return e.validateSchema(d,b.items[a],e.joinPath(c,a),f);if(!1===b.additionalItems)return e.errors.push({property:e.joinPath(c,a),propertyValue:d,attributeName:"additionalItems",attributeValue:!1}),f()},d):g(b.items)&&a&&!m(a)?j(a,function(d,f,g){return e.validateSchema(a[d],b.items,e.joinPath(c,d),g)},d):d()};f.prototype.validateProperties=function(a,b,c,d){var e=this;return j(b.properties,function(d,f,g){var k="object"===f.type&&f.properties,
-h="array"===f.type,j=e.getProperty(d,a),s=e.joinPath(c,d);return k||h?e.validateSchema(j,b.properties[d],s,g):e.validateProperty(s,j,f,g)},d)};f.prototype.validateProperty=function(a,b,c,d){var e=this,f={};"validateItems validateProperties validateSchema validateProperty getProperty attributes errors joinPath".split(" ").forEach(function(a){f[a]=this[a]},e);return!0!==c.required&&u(b)?d():j(e.attributes,function(d,j,h){var m=e.errors.length;f.addError=function(f){return g(f)?e.errors.push({property:f.property||
-a,propertyValue:f.propertyValue||b,attributeName:f.attributeName||d,attributeValue:f.attributeValue||c[d],message:f.message||void 0}):e.errors.push({property:a,propertyValue:b,attributeName:d,attributeValue:c[d],message:f})};var n=function(a){return!0===a||k(a)?(f.addError(a),h(!0)):e.errors.length>m&&e.singleError?h(!0):h()};return"undefined"!==typeof c[d]?j.apply(f,[a,b,c[d],c,n]):h()},d)};f.prototype.validateSchema=function(a,b,c,d){var e=this;return e.validateProperty(c,a,b,function(){return b.properties?
-e.validateProperties(a,b,c,d):b.items?e.validateItems(a,b,c,d):d()})};n.json={validate:function(a,b,c,d){"function"===typeof c&&(d=c,c={});return(new f(c)).validate(a,b,d)},addAttribute:function(a,b){return f.prototype.addAttribute.apply(f,arguments)},addAttributeConstructor:function(a,b){return f.prototype.addAttributeConstructor.apply(f,arguments)}};var q=function(a){if(!Object.prototype.hasOwnProperty.apply(n,[a]))throw Error("The \u2018"+a+"\u2019 engine is not supported. Please use a different one.");
-return n[a]};q.validate=function(a,b,c,d){var e=n.json;return e.validate.apply(e,arguments)};q.addValidator=function(a,b){var c=n.json;return c.addAttribute.apply(c,arguments)};q.addAttribute=function(a,b){var c=n.json;return c.addAttribute.apply(c,arguments)};q.addAttributeConstructor=function(a,b){var c=n.json;return c.addAttributeConstructor.apply(c,arguments)};"undefined"!==typeof module&&module.exports?module.exports=q:"undefined"!==typeof define?define(function(){return q}):this.amanda=q})();
+h="array"===f.type,j=e.getProperty(d,a),s=e.joinPath(c,d);return k||h?e.validateSchema(j,b.properties[d],s,g):e.validateProperty(s,j,f,g)},d)};f.prototype.validateProperty=function(a,b,c,d){var e=this,f={};"validateItems validateProperties validateSchema validateProperty getProperty attributes errors joinPath".split(" ").forEach(function(a){f[a]=this[a]},e);return!0!==c.required&&v(b)?d():j(e.attributes,function(d,j,h){var m=e.errors.length;f.addError=function(f){return g(f)?e.errors.push({property:f.property||
+a,propertyValue:f.propertyValue||b,attributeName:f.attributeName||d,attributeValue:f.attributeValue||c[d],message:f.message||void 0}):e.errors.push({property:a,propertyValue:b,attributeName:d,attributeValue:c[d],message:f})};var n=function(a){return!0===a||k(a)?(f.addError(a),h(!0)):e.errors.length>m&&e.singleError?h(!0):h()};return t(c[d])?j.apply(f,[a,b,c[d],c,n]):h()},d)};f.prototype.validateSchema=function(a,b,c,d){var e=this;return e.validateProperty(c,a,b,function(){return b.properties?e.validateProperties(a,
+b,c,d):b.items?e.validateItems(a,b,c,d):d()})};n.json={validate:function(a,b,c,d){"function"===typeof c&&(d=c,c={});return(new f(c)).validate(a,b,d)},addAttribute:function(a,b){return f.prototype.addAttribute.apply(f,arguments)},addAttributeConstructor:function(a,b){return f.prototype.addAttributeConstructor.apply(f,arguments)}};var q=function(a){if(!Object.prototype.hasOwnProperty.apply(n,[a]))throw Error("The \u2018"+a+"\u2019 engine is not supported. Please use a different one.");return n[a]};
+q.validate=function(a,b,c,d){var e=n.json;return e.validate.apply(e,arguments)};q.addValidator=function(a,b){var c=n.json;return c.addAttribute.apply(c,arguments)};q.addAttribute=function(a,b){var c=n.json;return c.addAttribute.apply(c,arguments)};q.addAttributeConstructor=function(a,b){var c=n.json;return c.addAttributeConstructor.apply(c,arguments)};"undefined"!==typeof module&&module.exports?module.exports=q:"undefined"!==typeof define?define(function(){return q}):this.amanda=q})();

0 comments on commit 36f13f6

Please sign in to comment.
Something went wrong with that request. Please try again.