rename dv to dataValidation for readability

This commit is contained in:
Andrzej Stepien 2023-09-09 11:33:18 +02:00
parent fb64b41043
commit a5e7ceca1d
1 changed files with 0 additions and 23 deletions

View File

@ -1,23 +0,0 @@
import { DateTime } from "luxon"
export default {
isNumber (n){
if(isNaN(n)){return false}
if (typeof n === "number") { return true }
return false
},
isString (s){
if (typeof s === 'string') { return true }
return false
},
dateStringIsValid(str){
if(str===null){return true}
if(DateTime.fromFormat(str,'yyyy-MM-dd').isValid){
return true
}
return false
},
isObject(objValue) {
return objValue && typeof objValue === 'object' && objValue.constructor === Object;
}
}