Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

nano-repeat

egoist10MIT1.0.0

Minimalistic String.prototype.repeat

repeat, nano, string, string.prototype.repeat

readme

nano-repeat

NPM version NPM downloads CircleCI donate

Install

npm i nano-repeat

Usage

const repeat = require('nano-repeat')

repeat('abc', 3)
//=> abcabcabc

repeat('abc', -1)
//=> RangeError: count must be non-negative

API

repeat(str, count)

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

nano-repeat © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).

egoist.moe · GitHub @egoist · Twitter @rem_rin_rin