wallet-core/node_modules/concordance/lib/Indenter.js

23 lines
360 B
JavaScript
Raw Normal View History

2017-08-14 05:01:11 +02:00
'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