fill-range
Advanced tools
Comparing version 3.0.0 to 3.0.1
{ | ||
"name": "fill-range", | ||
"description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"homepage": "https://github.com/jonschlinkert/fill-range", | ||
@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", |
@@ -130,12 +130,12 @@ # fill-range [![NPM version](https://img.shields.io/npm/v/fill-range.svg?style=flat)](https://www.npmjs.com/package/fill-range) [![NPM downloads](https://img.shields.io/npm/dm/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![Build Status](https://img.shields.io/travis/jonschlinkert/fill-range.svg?style=flat)](https://travis-ci.org/jonschlinkert/fill-range) | ||
Optionally pass a custom function as the third or fourth argument or on `options.transform`. | ||
Optionally pass a custom function as last argument or on `options.transform`. | ||
```js | ||
fill('a', 'e', function (val, isNumber, pad, i) { | ||
if (!isNumber) { | ||
return String.fromCharCode(val) + i; | ||
} | ||
return val; | ||
// increase padding by two | ||
var arr = fill('01', '05', function(val, a, b, step, idx, arr, options) { | ||
return repeat('0', (options.maxLength + 2) - val.length) + val; | ||
}); | ||
//=> ['a0', 'b1', 'c2', 'd3', 'e4'] | ||
console.log(arr); | ||
//=> ['0001', '0002', '0003', '0004', '0005'] | ||
``` | ||
@@ -142,0 +142,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
14224
0