wallet-core/node_modules/concordance/lib/Indenter.js
2017-08-14 05:02:09 +02:00

23 lines
360 B
JavaScript

'use strict'
class Indenter {
constructor (level, step) {
this.level = level
this.step = step
this.value = step.repeat(level)
}
increase () {
return new Indenter(this.level + 1, this.step)
}
decrease () {
return new Indenter(this.level - 1, this.step)
}
toString () {
return this.value
}
}
module.exports = Indenter