{
  "_args": [
    [
      {
        "raw": "bower-endpoint-parser@0.2.2",
        "scope": null,
        "escapedName": "bower-endpoint-parser",
        "name": "bower-endpoint-parser",
        "rawSpec": "0.2.2",
        "spec": "0.2.2",
        "type": "version"
      },
      "/home/travis/build/lukesargeant/ember-sparkline/node_modules/ember-cli"
    ]
  ],
  "_from": "bower-endpoint-parser@0.2.2",
  "_id": "bower-endpoint-parser@0.2.2",
  "_inCache": true,
  "_location": "/bower-endpoint-parser",
  "_npmUser": {
    "name": "sheerun",
    "email": "sheerun@sher.pl"
  },
  "_npmVersion": "1.3.24",
  "_phantomChildren": {},
  "_requested": {
    "raw": "bower-endpoint-parser@0.2.2",
    "scope": null,
    "escapedName": "bower-endpoint-parser",
    "name": "bower-endpoint-parser",
    "rawSpec": "0.2.2",
    "spec": "0.2.2",
    "type": "version"
  },
  "_requiredBy": [
    "/ember-cli"
  ],
  "_resolved": "https://registry.npmjs.org/bower-endpoint-parser/-/bower-endpoint-parser-0.2.2.tgz",
  "_shasum": "00b565adbfab6f2d35addde977e97962acbcb3f6",
  "_shrinkwrap": null,
  "_spec": "bower-endpoint-parser@0.2.2",
  "_where": "/home/travis/build/lukesargeant/ember-sparkline/node_modules/ember-cli",
  "author": {
    "name": "Twitter"
  },
  "bugs": {
    "url": "https://github.com/bower/endpoint-parser/issues"
  },
  "dependencies": {},
  "description": "Little module that helps with endpoints parsing.",
  "devDependencies": {
    "expect.js": "~0.2.0",
    "mocha": "~1.12.0",
    "mout": "~0.9.0"
  },
  "directories": {},
  "dist": {
    "shasum": "00b565adbfab6f2d35addde977e97962acbcb3f6",
    "tarball": "https://registry.npmjs.org/bower-endpoint-parser/-/bower-endpoint-parser-0.2.2.tgz"
  },
  "engines": {
    "node": ">=0.8.0"
  },
  "homepage": "https://github.com/bower/endpoint-parser#readme",
  "licenses": [
    {
      "type": "MIT",
      "url": "https://github.com/bower/endpoint-parser/blob/master/LICENSE"
    }
  ],
  "main": "index.js",
  "maintainers": [
    {
      "name": "satazor",
      "email": "andremiguelcruz@msn.com"
    },
    {
      "name": "wibblymat",
      "email": "mat@wibbly.org.uk"
    },
    {
      "name": "paulirish",
      "email": "paul.irish@gmail.com"
    },
    {
      "name": "sheerun",
      "email": "sheerun@sher.pl"
    },
    {
      "name": "sindresorhus",
      "email": "sindresorhus@gmail.com"
    }
  ],
  "name": "bower-endpoint-parser",
  "optionalDependencies": {},
  "readme": "# endpoint-parser [![Build Status](https://secure.travis-ci.org/bower/endpoint-parser.png?branch=master)](http://travis-ci.org/bower/endpoint-parser)\n\nLittle module that helps with endpoints parsing.\n\n\n## API\n\n### .decompose(endpoint)\n\nDecomposes a endpoint into `name`, `source` and `target`.\n\n```js\nvar endpointParser = require('bower-endpoint-parser');\n\nendpointParser.decompose('jquery#~2.0.0');\n// { name: '', source: 'jquery', target: '~2.0.0' }\n\nendpointParser.decompose('backbone=backbone-amd#~1.0.0');\n// { name: 'backbone', source: 'backbone-amd', target: '~1.0.0' }\n\nendpointParser.decompose('http://twitter.github.io/bootstrap/assets/bootstrap.zip');\n// { name: '', source: 'http://twitter.github.io/bootstrap/assets/bootstrap', target: '*' }\n\nendpointParser.decompose('bootstrap=http://twitter.github.io/bootstrap/assets/bootstrap.zip');\n// { name: 'bootstrap', source: 'http://twitter.github.io/bootstrap/assets/bootstrap', target: '*' }\n```\n\n### .compose(decEndpoint)\n\nInverse of `decompose()`.   \nTakes a decomposed endpoint and composes it back into a string.\n\n```js\nvar endpointParser = require('bower-endpoint-parser');\n\nendpointParser.compose({ name: '', source: 'jquery', target: '~2.0.0' });\n// jquery#~2.0.0\n\nendpointParser.compose({ name: 'backbone', source: 'backbone-amd', target: '~1.0.0' });\n// backbone=backbone-amd#~1.0.0\n\nendpointParser.compose({ name: '', source: 'http://twitter.github.io/bootstrap/assets/bootstrap', target: '*' });\n// http://twitter.github.io/bootstrap/assets/bootstrap.zip\n\nendpointParser.compose({ name: 'bootstrap', source: 'http://twitter.github.io/bootstrap/assets/bootstrap', target: '*' });\n// bootstrap=http://twitter.github.io/bootstrap/assets/bootstrap.zip\n```\n\n### .json2decomposed(key, value)\n\nSimilar to `decompose()` but specially designed to be used when parsing `bower.json` dependencies.\nFor instance, in a `bower.json` like this:\n\n```js\n{\n    \"name\": \"foo\",\n    \"version\": \"0.1.0\",\n    \"dependencies\": {\n        \"jquery\": \"~1.9.1\",\n        \"backbone\": \"backbone-amd#~1.0.0\",\n        \"bootstrap\": \"http://twitter.github.io/bootstrap/assets/bootstrap\"\n    }\n}\n```\n\nYou would call `json2decomposed` like so:\n\n```js\nendpointParser.json2decomposed('jquery', '~1.9.1');\n// { name: 'jquery', source: 'jquery', target: '~1.9.1' }\n\nendpointParser.json2decomposed('backbone', 'backbone-amd#~1.0.0');\n// { name: 'backbone', source: 'backbone-amd', target: '~1.0.0' }\n\nendpointParser.json2decomposed('bootstrap', 'http://twitter.github.io/bootstrap/assets/bootstrap');\n// { name: 'bootstrap', source: 'http://twitter.github.io/bootstrap/assets/bootstrap', target: '*' }\n```\n\n### .decomposed2json(decEndpoint)\n\nInverse of `json2decomposed()`.   \nTakes a decomposed endpoint and composes it to be saved to `bower.json`.\n\n```js\nvar endpointParser = require('bower-endpoint-parser');\n\nendpointParser.decomposed2json({ name: 'jquery', source: 'jquery', target: '~2.0.0' });\n// { jquery: '~2.0.0' }\n\nendpointParser.decomposed2json({ name: 'backbone', source: 'backbone-amd', target: '~1.0.0' });\n// { backbone: 'backbone-amd#~2.0.0' }\n\nendpointParser.decomposed2json({ name: 'bootstrap', source: 'http://twitter.github.io/bootstrap/assets/bootstrap', target: '*' });\n// { bootstrap: 'http://twitter.github.io/bootstrap/assets/bootstrap' }\n```\n\nThis function throws an exception if the `name` from the decomposed endpoint is empty.\n\n\n## License\n\nReleased under the [MIT License](http://www.opensource.org/licenses/mit-license.php).\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git://github.com/bower/endpoint-parser.git"
  },
  "scripts": {
    "test": "mocha -R spec"
  },
  "version": "0.2.2"
}
