expand-range
Advanced tools
Comparing version 0.2.1 to 0.3.0
@@ -10,11 +10,12 @@ /*! | ||
var fillRange = require('fill-range'); | ||
var fill = require('fill-range'); | ||
module.exports = function expandRange(str, fn) { | ||
var args = str.split('..'); | ||
if (args.length < 1) { | ||
return str; | ||
if (args.length === 1) { | ||
return args; | ||
} | ||
return fillRange.apply(fillRange, args.concat(fn)); | ||
return fill.apply(fill, args.concat(fn)); | ||
}; |
{ | ||
"name": "expand-range", | ||
"description": "Faster, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks.", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"homepage": "https://github.com/jonschlinkert/expand-range", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -5,2 +5,9 @@ # expand-range [![NPM version](https://badge.fury.io/js/expand-range.svg)](http://badge.fury.io/js/expand-range) | ||
## Install with [npm](npmjs.org) | ||
```bash | ||
npm i expand-range --save | ||
``` | ||
## Benchmarks | ||
@@ -12,2 +19,3 @@ | ||
## Example usage | ||
@@ -60,2 +68,3 @@ | ||
### Custom function | ||
@@ -75,11 +84,5 @@ | ||
## Install | ||
### Install with [npm](npmjs.org): | ||
```bash | ||
npm i expand-range --save-dev | ||
``` | ||
## Running tests | ||
## Run tests | ||
```bash | ||
@@ -105,5 +108,5 @@ npm test | ||
_This file was generated by [verb](https://github.com/assemble/verb) on November 25, 2014._ | ||
_This file was generated by [verb](https://github.com/assemble/verb) on December 14, 2014. To update, run `npm i -g verb && verb`._ | ||
[unicode]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode |
Sorry, the diff of this file is not supported yet
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
107
4958
6
15