Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/wa.picotech.app/public_html/node_modules/express-validator/src/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.runAllChains = exports.toString = exports.bindAll = void 0;
const bindAll = (object) => {
const protoKeys = Object.getOwnPropertyNames(Object.getPrototypeOf(object));
protoKeys.forEach(key => {
const maybeFn = object[key];
if (typeof maybeFn === 'function' && key !== 'constructor') {
object[key] = maybeFn.bind(object);
}
});
return object;
};
exports.bindAll = bindAll;
function toString(value) {
if (value instanceof Date) {
return value.toISOString();
}
else if (value && typeof value === 'object' && value.toString) {
if (typeof value.toString !== 'function') {
return Object.getPrototypeOf(value).toString.call(value);
}
return value.toString();
}
else if (value == null || (isNaN(value) && !value.length)) {
return '';
}
return String(value);
}
exports.toString = toString;
/**
* Runs all validation chains, and returns their results.
*
* If one of them has a request-level bail set, the previous chains will be awaited on so that
* results are not skewed, which can be slow.
* If this same chain also contains errors, no further chains are run.
*/
async function runAllChains(req, chains, runOpts) {
const promises = [];
for (const chain of chains) {
const bails = chain.builder.build().bail;
if (bails) {
await Promise.all(promises);
}
const resultPromise = chain.run(req, runOpts);
promises.push(resultPromise);
if (bails) {
const result = await resultPromise;
if (!result.isEmpty()) {
break;
}
}
}
return Promise.all(promises);
}
exports.runAllChains = runAllChains;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0037 ]-- |