ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 3.143.241.15 Web Server : Apache System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : nicngo5 ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/node_modules/ajv-keywords/keywords/ |
Upload File : |
'use strict'; var SCALAR_TYPES = ['number', 'integer', 'string', 'boolean', 'null']; module.exports = function defFunc(ajv) { defFunc.definition = { type: 'array', compile: function(keys, parentSchema, it) { var equal = it.util.equal; var scalar = getScalarKeys(keys, parentSchema); return function(data) { if (data.length > 1) { for (var k=0; k < keys.length; k++) { var i, key = keys[k]; if (scalar[k]) { var hash = {}; for (i = data.length; i--;) { if (!data[i] || typeof data[i] != 'object') continue; var prop = data[i][key]; if (prop && typeof prop == 'object') continue; if (typeof prop == 'string') prop = '"' + prop; if (hash[prop]) return false; hash[prop] = true; } } else { for (i = data.length; i--;) { if (!data[i] || typeof data[i] != 'object') continue; for (var j = i; j--;) { if (data[j] && typeof data[j] == 'object' && equal(data[i][key], data[j][key])) return false; } } } } } return true; }; }, metaSchema: { type: 'array', items: {type: 'string'} } }; ajv.addKeyword('uniqueItemProperties', defFunc.definition); return ajv; }; function getScalarKeys(keys, schema) { return keys.map(function(key) { var properties = schema.items && schema.items.properties; var propType = properties && properties[key] && properties[key].type; return Array.isArray(propType) ? propType.indexOf('object') < 0 && propType.indexOf('array') < 0 : SCALAR_TYPES.indexOf(propType) >= 0; }); }