1.2.2 • Published 5 years ago

reverse-repeat v1.2.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

reverse-repeat

Build status Test coverage NPM version NPM Downloads

A reversed approach to the javascript's repeat method.

Install

npm install reverse-repeat --save
yarn add reverse-repeat

Usage

const reverseRepeat = require('reverse-repeat');

'foobar'.repeat(3);
//=> 'foobarfoobarfoobar'

reverseRepeat('foobarfoobarfoobar').repeated;
//=> 'foobar'

reverseRepeat('foobarfoobarfoobar').count;
//=> 3

var chorus = 'Because I\'m happy. ';
chorus.repeat(3);
//=> 'Because I'm happy. Because I'm happy. Because I'm happy. '

reverseRepeat(chorus.repeat(3));
//=> { repeated: 'Because I\'m happy. ', count: 3 }

Credits

Developed by Umut Canbolat.

License

This project is licensed under the MIT License - see the LICENSE file for details

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago