Comparing version 1.1.3 to 2.0.0
@@ -6,7 +6,7 @@ 'use strict'; | ||
if (typeof str !== 'string') { | ||
throw new TypeError('Expected a string as the first argument'); | ||
throw new TypeError('Expected `input` to be a string'); | ||
} | ||
if (n < 0 || !isFinite(n)) { | ||
throw new TypeError('Expected a finite positive number'); | ||
throw new TypeError('Expected `count` to be a positive finite number'); | ||
} | ||
@@ -22,5 +22,5 @@ | ||
str += str; | ||
} while (n = n >> 1); | ||
} while ((n >>= 1)); | ||
return ret; | ||
}; |
{ | ||
"name": "repeating", | ||
"version": "1.1.3", | ||
"version": "2.0.0", | ||
"description": "Repeat a string - fast", | ||
@@ -12,3 +12,2 @@ "license": "MIT", | ||
}, | ||
"bin": "cli.js", | ||
"engines": { | ||
@@ -18,12 +17,8 @@ "node": ">=0.10.0" | ||
"scripts": { | ||
"test": "node test.js" | ||
"test": "xo && node test.js" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"cli.js" | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"cli-app", | ||
"cli", | ||
"bin", | ||
"repeat", | ||
@@ -40,4 +35,5 @@ "repeating", | ||
"devDependencies": { | ||
"ava": "0.0.4" | ||
"ava": "0.0.4", | ||
"xo": "*" | ||
} | ||
} |
@@ -6,8 +6,11 @@ # repeating [![Build Status](https://travis-ci.org/sindresorhus/repeating.svg?branch=master)](https://travis-ci.org/sindresorhus/repeating) | ||
## Usage | ||
## Install | ||
```sh | ||
``` | ||
$ npm install --save repeating | ||
``` | ||
## Usage | ||
```js | ||
@@ -21,22 +24,9 @@ var repeating = require('repeating'); | ||
## CLI | ||
## Related | ||
```sh | ||
$ npm install --global repeating | ||
``` | ||
- [repeat-cli](https://github.com/sindresorhus/repeat-cli) - CLI for this module | ||
``` | ||
$ repeating --help | ||
Usage | ||
repeating <string> <count> | ||
Example | ||
repeating 'unicorn ' 2 | ||
unicorn unicorn | ||
``` | ||
## License | ||
MIT © [Sindre Sorhus](http://sindresorhus.com) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3403
2
4
18
31