1.3.0 • Published 2 years ago

multipliable-string v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

multipliable-string NPM version NPM monthly downloads NPM total downloads

A class for creating a multipliable strings, which you can multiply as same, as in Python

Install

Install with npm:

$ npm install --save multipliable-string

Usage

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

Author

Demon of indifference

License

Copyright © 2021, Demon of indifference. Released under the MIT License.