This package has been deprecated

Author message:

WARNING: This module has been renamed to unrepeat. Please run, npm install unrepeat

reverse-repeat

1.2.2 • Public • Published

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

Package Sidebar

Install

npm i reverse-repeat

Weekly Downloads

2

Version

1.2.2

License

MIT

Unpacked Size

6.67 kB

Total Files

8

Last publish

Collaborators

  • umutcanbolat