Small refactoring

This commit is contained in:
barsdeveloper
2021-12-11 23:58:40 +01:00
parent 6b02ab7e08
commit a5c4f04f2b
11 changed files with 235 additions and 150 deletions

View File

@@ -11,6 +11,11 @@ export default class IntegerEntity extends Entity {
}
constructor(options = {}) {
if (options.constructor === Number || options.constructor === String) {
options = {
value: options
}
}
super(options)
this.value = Math.round(this.value)
}