Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /proc/thread-self/root/usr/share/nodejs/jsprim/lib/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : //proc/thread-self/root/usr/share/nodejs/jsprim/lib/jsprim-jsv.js

/*
 * lib/jsprim-jsv.js: extras for testing performance vs JSV
 */

var mod_assert = require('assert');
var mod_jsv;		/* lazy-loaded because it may not be here */

module.exports = {
	validateJsonObjectJSV: validateJsonObjectJSV
};

function validateJsonObjectJSV(schema, input)
{
	if (!mod_jsv)
		mod_jsv = require('JSV');

	var env = mod_jsv.JSV.createEnvironment();
	var report = env.validate(input, schema);

	if (report.errors.length === 0)
		return (null);

	/* Currently, we only do anything useful with the first error. */
	mod_assert.ok(report.errors.length > 0);
	var error = report.errors[0];

	/* The failed property is given by a URI with an irrelevant prefix. */
	var propname = error['uri'].substr(error['uri'].indexOf('#') + 2);
	var reason;

	/*
	 * Some of the default error messages are pretty arcane, so we define
	 * new ones here.
	 */
	switch (error['attribute']) {
	case 'type':
		reason = 'expected ' + error['details'];
		break;
	default:
		reason = error['message'].toLowerCase();
		break;
	}

	var message = reason + ': "' + propname + '"';
	var rv = new Error(message);
	rv.jsv_details = error;
	return (rv);
}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net