133 lines
9.8 KiB
JSON
133 lines
9.8 KiB
JSON
|
{
|
||
|
"_args": [
|
||
|
[
|
||
|
{
|
||
|
"raw": "fill-range@^2.1.0",
|
||
|
"scope": null,
|
||
|
"escapedName": "fill-range",
|
||
|
"name": "fill-range",
|
||
|
"rawSpec": "^2.1.0",
|
||
|
"spec": ">=2.1.0 <3.0.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/expand-range"
|
||
|
]
|
||
|
],
|
||
|
"_from": "fill-range@>=2.1.0 <3.0.0",
|
||
|
"_id": "fill-range@2.2.3",
|
||
|
"_inCache": true,
|
||
|
"_location": "/fill-range",
|
||
|
"_nodeVersion": "5.0.0",
|
||
|
"_npmUser": {
|
||
|
"name": "jonschlinkert",
|
||
|
"email": "github@sellside.com"
|
||
|
},
|
||
|
"_npmVersion": "3.3.6",
|
||
|
"_phantomChildren": {},
|
||
|
"_requested": {
|
||
|
"raw": "fill-range@^2.1.0",
|
||
|
"scope": null,
|
||
|
"escapedName": "fill-range",
|
||
|
"name": "fill-range",
|
||
|
"rawSpec": "^2.1.0",
|
||
|
"spec": ">=2.1.0 <3.0.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"_requiredBy": [
|
||
|
"/expand-range"
|
||
|
],
|
||
|
"_resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz",
|
||
|
"_shasum": "50b77dfd7e469bc7492470963699fe7a8485a723",
|
||
|
"_shrinkwrap": null,
|
||
|
"_spec": "fill-range@^2.1.0",
|
||
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/expand-range",
|
||
|
"author": {
|
||
|
"name": "Jon Schlinkert",
|
||
|
"url": "https://github.com/jonschlinkert"
|
||
|
},
|
||
|
"bugs": {
|
||
|
"url": "https://github.com/jonschlinkert/fill-range/issues"
|
||
|
},
|
||
|
"dependencies": {
|
||
|
"is-number": "^2.1.0",
|
||
|
"isobject": "^2.0.0",
|
||
|
"randomatic": "^1.1.3",
|
||
|
"repeat-element": "^1.1.2",
|
||
|
"repeat-string": "^1.5.2"
|
||
|
},
|
||
|
"description": "Fill in a range of numbers or letters, optionally passing an increment or multiplier to use.",
|
||
|
"devDependencies": {
|
||
|
"benchmarked": "^0.1.3",
|
||
|
"chalk": "^0.5.1",
|
||
|
"should": "*"
|
||
|
},
|
||
|
"directories": {},
|
||
|
"dist": {
|
||
|
"shasum": "50b77dfd7e469bc7492470963699fe7a8485a723",
|
||
|
"tarball": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz"
|
||
|
},
|
||
|
"engines": {
|
||
|
"node": ">=0.10.0"
|
||
|
},
|
||
|
"files": [
|
||
|
"index.js"
|
||
|
],
|
||
|
"gitHead": "6cb50d5c679d9e6d9e8ad97bb2efd63a8c8da610",
|
||
|
"homepage": "https://github.com/jonschlinkert/fill-range",
|
||
|
"keywords": [
|
||
|
"alpha",
|
||
|
"alphabetical",
|
||
|
"bash",
|
||
|
"brace",
|
||
|
"expand",
|
||
|
"expansion",
|
||
|
"glob",
|
||
|
"match",
|
||
|
"matches",
|
||
|
"matching",
|
||
|
"number",
|
||
|
"numerical",
|
||
|
"range",
|
||
|
"ranges",
|
||
|
"sh"
|
||
|
],
|
||
|
"license": "MIT",
|
||
|
"main": "index.js",
|
||
|
"maintainers": [
|
||
|
{
|
||
|
"name": "jonschlinkert",
|
||
|
"email": "github@sellside.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "doowb",
|
||
|
"email": "brian.woodward@gmail.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "es128",
|
||
|
"email": "elan.shanker+npm@gmail.com"
|
||
|
}
|
||
|
],
|
||
|
"name": "fill-range",
|
||
|
"optionalDependencies": {},
|
||
|
"readme": "# fill-range [![NPM version](https://badge.fury.io/js/fill-range.svg)](http://badge.fury.io/js/fill-range) [![Build Status](https://travis-ci.org/jonschlinkert/fill-range.svg)](https://travis-ci.org/jonschlinkert/fill-range) \n\n> Fill in a range of numbers or letters, optionally passing an increment or multiplier to use.\n\n## Install with [npm](npmjs.org)\n\n```bash\nnpm i fill-range --save\n```\n\n<!-- toc -->\n\n- [Usage](#usage)\n * [Invalid ranges](#invalid-ranges)\n * [Custom function](#custom-function)\n * [Special characters](#special-characters)\n + [plus](#plus)\n + [pipe and tilde](#pipe-and-tilde)\n + [angle bracket](#angle-bracket)\n + [question mark](#question-mark)\n- [Other useful libs](#other-useful-libs)\n- [Running tests](#running-tests)\n- [Contributing](#contributing)\n- [Author](#author)\n- [License](#license)\n\n_(Table of contents generated by [verb])_\n\n<!-- tocstop -->\n\n## Usage\n\n```js\nvar range = require('fill-range');\n\nrange('a', 'e');\n//=> ['a', 'b', 'c', 'd', 'e']\n```\n\n**Params**\n\n```js\nrange(start, stop, step, options, fn);\n```\n\n - `start`: **{String|Number}** the number or letter to start with\n - `end`: **{String|Number}** the number or letter to end with\n - `step`: **{String|Number}** optionally pass the step to use. works for letters or numbers.\n - `options`: **{Object}**:\n + `makeRe`: return a regex-compatible string (still returned as an array for consistency)\n + `step`: pass the step on the options as an alternative to passing it as an argument\n + `silent`: `true` by default, set to false to throw errors for invalid ranges. \n - `fn`: **{Function}** optionally [pass a function](#custom-function) to modify each character \n\n\n**Examples**\n\n```js\nrange(1, 3)\n//=> ['1', '2', '3']\n\nrange('1', '3')\n//=> ['1', '2', '3']\n\nrange('0', '-5')\n//=> [ '0', '-1', '-2', '-3', '-4', '-5' ]\n\nrange(-9, 9, 3)\n//=> [ '-9', '-6', '-3', '0', '3', '6', '9' ])\n\nrange('-1', '-10', '-2')\n//=> [ '-1', '-3', '-5', '-7', '-9' ]\n\nrange('1', '10', '2')\n//=> [ '1', '3', '5', '7', '9' ]\n\nrange('a', 'e')\n//=> ['a', 'b', 'c', 'd', 'e']\n\nrange('a', 'e', 2)\n//=> ['a', 'c', 'e']\n\nrange('A', 'E', 2)\n//=> ['A', 'C', 'E']\n```\n\n### Invalid ranges\n\nWhen an invalid range is passed, `null` is returned. \n\n```js\nrange('1.1', '2');\n//=> null\n\nrange('a', '2');\n//=> null\n\nrange(1, 10, 'foo');\n//=> null\n```\n\nIf you want errors to be throw, pass `silent: false` on the options:\n\n\n### Custom function\n\nOptionally pass a custom function as the third or fourth argument:\n\n```js\nrange('a', 'e', function (val, isNumber, pad, i) {\n if (!isNumber) {\n return String.fromCharCode(val) + i;\n }\n return val;\n});\n//=> ['a0', 'b1', 'c2', 'd3', 'e4']\n```\n\n### Special characters\n\nA special character may be passed as the third arg instead of a step increment. These characters can be pretty useful for brace expansion, creating file paths, test fixtures and similar use case.\n\n```js\nrange('a', 'z', SPECIAL_CHARACTER_HERE);\n```\n\n**Supported characters**\n\n - `+`: repeat the given string `n` times\n - `|`: create a regex-ready string, instead of an array\n - `>`: join values to single array element\n - `?`: randomize the given pattern using [randomatic]\n\n#### plus \n\nCharacter: _(`+`)_\n\nRepeat the first argument the number of times passed on the second argument.\n\n**Examples:**\n\n```js\nrange('a', 3, '+');\n//=> ['a', 'a', 'a']\n\nrange('abc', 2, '+');\n//=> ['abc', 'abc']\n```\n\n#### pipe and tilde\n\nCharacters: _(`|` and `~`)_\n\nCreates a regex-capable string (either a logical `or` or a character class) from the expanded arguments.\n\n**Examples:**\n\n```js\nrange('a', 'c', '|');\n//=> ['(a|b|c)'\n\nrange('a', 'c', '~');\n//=> ['[a-c]'\n\nrange('a', 'z', '|5');\n//=> ['(a|f|k|p|u|z)'\n```\n\n**Automatic separator correction**\n\nTo avoid this error:\n\n> `Range out of order in character class`\n\nFill-range detects invalid sequences and uses the correct syntax. For example:\n\n**invalid** (regex)\n\nIf you pa
|
||
|
"readmeFilename": "README.md",
|
||
|
"repository": {
|
||
|
"type": "git",
|
||
|
"url": "git+https://github.com/jonschlinkert/fill-range.git"
|
||
|
},
|
||
|
"scripts": {
|
||
|
"test": "mocha"
|
||
|
},
|
||
|
"verb": {
|
||
|
"related": {
|
||
|
"list": [
|
||
|
"micromatch",
|
||
|
"expand-range",
|
||
|
"braces",
|
||
|
"is-glob"
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
"version": "2.2.3"
|
||
|
}
|