114 lines
6.2 KiB
JSON
114 lines
6.2 KiB
JSON
|
{
|
||
|
"_args": [
|
||
|
[
|
||
|
{
|
||
|
"raw": "balanced-match@^1.0.0",
|
||
|
"scope": null,
|
||
|
"escapedName": "balanced-match",
|
||
|
"name": "balanced-match",
|
||
|
"rawSpec": "^1.0.0",
|
||
|
"spec": ">=1.0.0 <2.0.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/brace-expansion"
|
||
|
]
|
||
|
],
|
||
|
"_from": "balanced-match@>=1.0.0 <2.0.0",
|
||
|
"_id": "balanced-match@1.0.0",
|
||
|
"_inCache": true,
|
||
|
"_location": "/balanced-match",
|
||
|
"_nodeVersion": "7.8.0",
|
||
|
"_npmOperationalInternal": {
|
||
|
"host": "s3://npm-registry-packages",
|
||
|
"tmp": "tmp/balanced-match-1.0.0.tgz_1497251909645_0.8755026108119637"
|
||
|
},
|
||
|
"_npmUser": {
|
||
|
"name": "juliangruber",
|
||
|
"email": "julian@juliangruber.com"
|
||
|
},
|
||
|
"_npmVersion": "4.2.0",
|
||
|
"_phantomChildren": {},
|
||
|
"_requested": {
|
||
|
"raw": "balanced-match@^1.0.0",
|
||
|
"scope": null,
|
||
|
"escapedName": "balanced-match",
|
||
|
"name": "balanced-match",
|
||
|
"rawSpec": "^1.0.0",
|
||
|
"spec": ">=1.0.0 <2.0.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"_requiredBy": [
|
||
|
"/brace-expansion"
|
||
|
],
|
||
|
"_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||
|
"_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
|
||
|
"_shrinkwrap": null,
|
||
|
"_spec": "balanced-match@^1.0.0",
|
||
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/brace-expansion",
|
||
|
"author": {
|
||
|
"name": "Julian Gruber",
|
||
|
"email": "mail@juliangruber.com",
|
||
|
"url": "http://juliangruber.com"
|
||
|
},
|
||
|
"bugs": {
|
||
|
"url": "https://github.com/juliangruber/balanced-match/issues"
|
||
|
},
|
||
|
"dependencies": {},
|
||
|
"description": "Match balanced character pairs, like \"{\" and \"}\"",
|
||
|
"devDependencies": {
|
||
|
"matcha": "^0.7.0",
|
||
|
"tape": "^4.6.0"
|
||
|
},
|
||
|
"directories": {},
|
||
|
"dist": {
|
||
|
"shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
|
||
|
"tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz"
|
||
|
},
|
||
|
"gitHead": "d701a549a7653a874eebce7eca25d3577dc868ac",
|
||
|
"homepage": "https://github.com/juliangruber/balanced-match",
|
||
|
"keywords": [
|
||
|
"match",
|
||
|
"regexp",
|
||
|
"test",
|
||
|
"balanced",
|
||
|
"parse"
|
||
|
],
|
||
|
"license": "MIT",
|
||
|
"main": "index.js",
|
||
|
"maintainers": [
|
||
|
{
|
||
|
"name": "juliangruber",
|
||
|
"email": "julian@juliangruber.com"
|
||
|
}
|
||
|
],
|
||
|
"name": "balanced-match",
|
||
|
"optionalDependencies": {},
|
||
|
"readme": "# balanced-match\n\nMatch balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!\n\n[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)\n[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)\n\n[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)\n\n## Example\n\nGet the first matching pair of braces:\n\n```js\nvar balanced = require('balanced-match');\n\nconsole.log(balanced('{', '}', 'pre{in{nested}}post'));\nconsole.log(balanced('{', '}', 'pre{first}between{second}post'));\nconsole.log(balanced(/\\s+\\{\\s+/, /\\s+\\}\\s+/, 'pre { in{nest} } post'));\n```\n\nThe matches are:\n\n```bash\n$ node example.js\n{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }\n{ start: 3,\n end: 9,\n pre: 'pre',\n body: 'first',\n post: 'between{second}post' }\n{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }\n```\n\n## API\n\n### var m = balanced(a, b, str)\n\nFor the first non-nested matching pair of `a` and `b` in `str`, return an\nobject with those keys:\n\n* **start** the index of the first match of `a`\n* **end** the index of the matching `b`\n* **pre** the preamble, `a` and `b` not included\n* **body** the match, `a` and `b` not included\n* **post** the postscript, `a` and `b` not included\n\nIf there's no match, `undefined` will be returned.\n\nIf the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.\n\n### var r = balanced.range(a, b, str)\n\nFor the first non-nested matching pair of `a` and `b` in `str`, return an\narray with indexes: `[ <a index>, <b index> ]`.\n\nIf there's no match, `undefined` will be returned.\n\nIf the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.\n\n## Installation\n\nWith [npm](https://npmjs.org) do:\n\n```bash\nnpm install balanced-match\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
|
||
|
"readmeFilename": "README.md",
|
||
|
"repository": {
|
||
|
"type": "git",
|
||
|
"url": "git://github.com/juliangruber/balanced-match.git"
|
||
|
},
|
||
|
"scripts": {
|
||
|
"bench": "make bench",
|
||
|
"test": "make test"
|
||
|
},
|
||
|
"testling": {
|
||
|
"files": "test/*.js",
|
||
|
"browsers": [
|
||
|
"ie/8..latest",
|
||
|
"firefox/20..latest",
|
||
|
"firefox/nightly",
|
||
|
"chrome/25..latest",
|
||
|
"chrome/canary",
|
||
|
"opera/12..latest",
|
||
|
"opera/next",
|
||
|
"safari/5.1..latest",
|
||
|
"ipad/6.0..latest",
|
||
|
"iphone/6.0..latest",
|
||
|
"android-browser/4.2..latest"
|
||
|
]
|
||
|
},
|
||
|
"version": "1.0.0"
|
||
|
}
|