forked from projectmoon/tenebrous-dicebot
6 lines
1.4 KiB
JavaScript
6 lines
1.4 KiB
JavaScript
/*
|
|
* This file was automatically generated.
|
|
* DO NOT MODIFY BY HAND.
|
|
* Run `yarn special-lint-fix` to update
|
|
*/
|
|
const r=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;function t(e,{instancePath:s="",parentData:i,parentDataProperty:n,rootData:a=e}={}){if(!e||"object"!=typeof e||Array.isArray(e))return t.errors=[{params:{type:"object"}}],!1;{const s=0;for(const r in e)if("context"!==r&&"hashDigest"!==r&&"hashDigestLength"!==r&&"hashFunction"!==r)return t.errors=[{params:{additionalProperty:r}}],!1;if(0===s){if(void 0!==e.context){let s=e.context;const i=0;if(0===i){if("string"!=typeof s)return t.errors=[{params:{type:"string"}}],!1;if(s.includes("!")||!0!==r.test(s))return t.errors=[{params:{}}],!1}var o=0===i}else o=!0;if(o){if(void 0!==e.hashDigest){let r=e.hashDigest;const s=0;if("hex"!==r&&"latin1"!==r&&"base64"!==r)return t.errors=[{params:{}}],!1;o=0===s}else o=!0;if(o){if(void 0!==e.hashDigestLength){let r=e.hashDigestLength;const s=0;if(0===s){if("number"!=typeof r||!isFinite(r))return t.errors=[{params:{type:"number"}}],!1;if(r<1||isNaN(r))return t.errors=[{params:{comparison:">=",limit:1}}],!1}o=0===s}else o=!0;if(o)if(void 0!==e.hashFunction){let r=e.hashFunction;const s=0;if(0===s){if("string"!=typeof r)return t.errors=[{params:{type:"string"}}],!1;if(r.length<1)return t.errors=[{params:{}}],!1}o=0===s}else o=!0}}}}return t.errors=null,!0}module.exports=t,module.exports.default=t; |