Grammar fixed

This commit is contained in:
barsdeveloper
2021-10-22 18:44:44 +02:00
parent 051eed061d
commit a34be2351e
10 changed files with 188 additions and 97 deletions

View File

@@ -1,8 +1,24 @@
import Entity from "./Entity"
export default class Integer extends Entity {
static attributes = {
value: 0
}
constructor(value) {
super()
this.value = Math.round(new Number(value).valueOf())
if (value?.constructor === String) {
value = Number(value)
}
if (value?.constructor === Number) {
value = {
value: Math.round(value.valueOf())
}
}
super(value)
}
getAttributes() {
return Integer.attributes
}
}