Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/OTapi/node_modules/mongoose/lib/schema/operators/ drwxr-xr-x | |
| Viewing file: Select action/file-type: /*!
* Module requirements.
*/
'use strict';
const CastError = require('../../error/cast');
/*!
* ignore
*/
function handleBitwiseOperator(val) {
const _this = this;
if (Array.isArray(val)) {
return val.map(function(v) {
return _castNumber(_this.path, v);
});
} else if (Buffer.isBuffer(val)) {
return val;
}
// Assume trying to cast to number
return _castNumber(_this.path, val);
}
/*!
* ignore
*/
function _castNumber(path, num) {
const v = Number(num);
if (isNaN(v)) {
throw new CastError('number', num, path);
}
return v;
}
module.exports = handleBitwiseOperator;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0043 ]-- |