A class for creating a multipliable strings, which you can multiply as same, as in Python
Install with npm:
$ npm install --save multipliable-string
You can import class MultipliableString
and work with it as same, as with String
class in JavaScript. For multiply you should call the multiply()
method.
const MultipliableString = require('multipliable-string');
console.log(`Javascript goes b${new MultipliableString('r').multiply(30)}`); //=> Javascript goes brrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
const myVar = new MultipliableString('Test');
console.log(myVar.multiply(10)); //=> TestTestTestTestTestTestTestTestTestTest
Demon of indifference
Copyright © 2021, Demon of indifference. Released under the MIT License.