Minification of code and html string template

This commit is contained in:
barsdeveloper
2021-12-06 22:07:51 +01:00
parent 76ae9ed3c0
commit 7bc0f4e2f2
9 changed files with 32 additions and 2237 deletions

View File

@@ -10,9 +10,9 @@ export default class IntegerEntity extends Entity {
return IntegerEntity.attributes
}
constructor(options = { value: 0 }) {
options.value = Math.round(options.value)
constructor(options = {}) {
super(options)
this.value = Math.round(this.value)
}
valueOf() {

View File

@@ -0,0 +1,10 @@
import IntegerEntity from "./IntegerEntity"
import Utility from "../Utility"
export default class NaturalNumberEntity extends IntegerEntity {
constructor(options = {}) {
super(options)
this.value = Math.round(Utility.clamp(this.value, 0))
}
}