Файловый менеджер - Редактировать - /home/freeclou/app.optimyar.com/front-web/build/assets/fonts/iran-yekan/beflpn/lib.tar
Назад
index.js 0000664 00000002211 15103633010 0006177 0 ustar 00 'use strict'; var mongoose = require('mongoose'); var util = require('util'); var CastError = mongoose.SchemaType.CastError; function FloatType(digits) { function Float(path, options) { this.path = path; mongoose.SchemaTypes.Number.call(this, path, options); } util.inherits(Float, mongoose.SchemaTypes.Number); Float.prototype.cast = function(value) { if (value == null || value === '') { return value; } if (typeof value === 'string' || typeof value === 'boolean') { value = Number(value); } if (isNaN(value)) return new CastError('Number', value, this.path); return Number(value.toFixed(digits || 2)); }; Float._checkRequired = value => typeof value === 'number' || value instanceof Number; return Float; } module.exports.loadType = function(mongoose, digits) { var floatType = new FloatType(digits); if (mongoose.Schema && typeof mongoose.Schema.Types === 'object') { mongoose.Schema.Types.Float = floatType; } if (typeof mongoose.SchemaTypes === 'object') { mongoose.SchemaTypes.Float = floatType; } if (typeof mongoose.Types === 'object') { mongoose.Types.Float = floatType; } return floatType; };
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка