{"_id":"bower-endpoint-parser","_rev":"21-78d89d03b9eb6b9f3b823222b2e1f2d4","name":"bower-endpoint-parser","description":"Little module that helps with endpoints parsing.","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0-rc.1":{"name":"bower-endpoint-parser","version":"0.1.0-rc.1","description":"Little module that helps with endpoints parsing.","author":{"name":"Twitter"},"licenses":[{"type":"MIT","url":"https://github.com/bower/endpoint-parser/blob/master/LICENSE"}],"repository":{"type":"git","url":"git://github.com/bower/endpoint-parser.git"},"main":"index.js","engines":{"node":">=0.8.0"},"devDependencies":{"expect.js":"~0.2.0","mocha":"~1.12.0","mout":"~0.6.0"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/bower/endpoint-parser/issues"},"_id":"bower-endpoint-parser@0.1.0-rc.1","dist":{"shasum":"aa71223f316b12f3b602a5deba2c282b296191cb","tarball":"https://registry.npmjs.org/bower-endpoint-parser/-/bower-endpoint-parser-0.1.0-rc.1.tgz","integrity":"sha512-JXEKznOuKTZwPIwEMEeDeDSFachUMg+EgliRKwgFbS6KWhXEtP5Ed2uZIVrF9zN8rs1svR0ElxE+azIc2r0tEw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA9IxidFnRPfB3VzX/xHG/OkkJU0L9cNReUMk04J5CNoAiEA+teI8gVglvbfcINs1FhLKCfbX5/ekDR4Wm/nFN9qIto="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"satazor","email":"andremiguelcruz@msn.com"},"maintainers":[{"name":"satazor","email":"andremiguelcruz@msn.com"}]},"0.1.0":{"name":"bower-endpoint-parser","version":"0.1.0","description":"Little module that helps with endpoints parsing.","author":{"name":"Twitter"},"licenses":[{"type":"MIT","url":"https://github.com/bower/endpoint-parser/blob/master/LICENSE"}],"repository":{"type":"git","url":"git://github.com/bower/endpoint-parser.git"},"main":"index.js","engines":{"node":">=0.8.0"},"devDependencies":{"expect.js":"~0.2.0","mocha":"~1.12.0","mout":"~0.6.0"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/bower/endpoint-parser/issues"},"_id":"bower-endpoint-parser@0.1.0","dist":{"shasum":"635b2d351fee516b6f2abdc19b17c19c92eaaf7b","tarball":"https://registry.npmjs.org/bower-endpoint-parser/-/bower-endpoint-parser-0.1.0.tgz","integrity":"sha512-SukpobMVl1SBQQC8StiyNCUJ2QYQzmSndW3LKpGt0eGd95m1meHR2lI/kFW1YRUm7p2zfkbKpALiJgtwpNMypQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHwc/mVuo9BKHC0Wxc7ZflgC+tRV1NkeZ6kXM0zZFVRwAiEArcue61oB4lWAsTHxcJLhqMbKtZ0vqihOlDrxc1DXhDY="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"satazor","email":"andremiguelcruz@msn.com"},"maintainers":[{"name":"satazor","email":"andremiguelcruz@msn.com"}]},"0.2.0":{"name":"bower-endpoint-parser","version":"0.2.0","description":"Little module that helps with endpoints parsing.","author":{"name":"Twitter"},"licenses":[{"type":"MIT","url":"https://github.com/bower/endpoint-parser/blob/master/LICENSE"}],"repository":{"type":"git","url":"git://github.com/bower/endpoint-parser.git"},"main":"index.js","engines":{"node":">=0.8.0"},"devDependencies":{"expect.js":"~0.2.0","mocha":"~1.12.0","mout":"~0.6.0"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/bower/endpoint-parser/issues"},"_id":"bower-endpoint-parser@0.2.0","dist":{"shasum":"531f4e64d71b3cb8210532a15f4b58aaf7d46182","tarball":"https://registry.npmjs.org/bower-endpoint-parser/-/bower-endpoint-parser-0.2.0.tgz","integrity":"sha512-y1bVYjdzRpm/UBAqF+z7YwFZmFZvLiRac4OpyFa58ctNJo9Oom25J/Fj9LZ/TDX05rRlw5RHytH7Ruo4oq7GoA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDA0WJ/2OOjRqnGQtV8ZAP6rs/GBQbXEImfpbFhIZq5XAiEAuoHEtU963FMwxslghgPcn4ANu38kMp3+u1U46OQdJQ8="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"satazor","email":"andremiguelcruz@msn.com"},"maintainers":[{"name":"satazor","email":"andremiguelcruz@msn.com"}]},"0.2.1":{"name":"bower-endpoint-parser","version":"0.2.1","description":"Little module that helps with endpoints parsing.","author":{"name":"Twitter"},"licenses":[{"type":"MIT","url":"https://github.com/bower/endpoint-parser/blob/master/LICENSE"}],"repository":{"type":"git","url":"git://github.com/bower/endpoint-parser.git"},"main":"index.js","engines":{"node":">=0.8.0"},"devDependencies":{"expect.js":"~0.2.0","mocha":"~1.12.0","mout":"~0.6.0"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/bower/endpoint-parser/issues"},"_id":"bower-endpoint-parser@0.2.1","dist":{"shasum":"8c4010a2900cdab07ea5d38f0bd03e9bbccef90f","tarball":"https://registry.npmjs.org/bower-endpoint-parser/-/bower-endpoint-parser-0.2.1.tgz","integrity":"sha512-Hn0mrtju2JFNMLDrseDbcc17kSJyj/KrkrrjIb1gPinqx2Nr3g/J5j43clUdQLOvT3QeuhpP1C29qTACSJKI5Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5PoAbp34AeBeDhGUB0z/D1TRWLepK3cQ74a3mKq6MEAIgdxkiFxTRECllhUI8ohxc6YLEYhFtXneLAUABiooW0Gg="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"satazor","email":"andremiguelcruz@msn.com"},"maintainers":[{"name":"satazor","email":"andremiguelcruz@msn.com"}]},"0.2.2":{"name":"bower-endpoint-parser","version":"0.2.2","description":"Little module that helps with endpoints parsing.","author":{"name":"Twitter"},"licenses":[{"type":"MIT","url":"https://github.com/bower/endpoint-parser/blob/master/LICENSE"}],"repository":{"type":"git","url":"git://github.com/bower/endpoint-parser.git"},"main":"index.js","engines":{"node":">=0.8.0"},"devDependencies":{"expect.js":"~0.2.0","mocha":"~1.12.0","mout":"~0.9.0"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/bower/endpoint-parser/issues"},"homepage":"https://github.com/bower/endpoint-parser","_id":"bower-endpoint-parser@0.2.2","dist":{"shasum":"00b565adbfab6f2d35addde977e97962acbcb3f6","tarball":"https://registry.npmjs.org/bower-endpoint-parser/-/bower-endpoint-parser-0.2.2.tgz","integrity":"sha512-YWZHhWkPdXtIfH3VRu3QIV95sa75O9vrQWBOHjexWCLBCTy5qJvRr36LXTqFwTchSXVlzy5piYJOjzHr7qhsNg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGnqjO7Ox/aMXwXNOZtoneZu5fpGDqer+9X+9nADFU6fAiBb1y3esH4Uu4CB72Lk+j0t4D9tDeGBbn3Bq4olyRA3vg=="}]},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"sheerun","email":"sheerun@sher.pl"},"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"}]}},"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","maintainers":[{"email":"mat@wibbly.org.uk","name":"wibblymat"},{"email":"paul.irish@gmail.com","name":"paulirish"},{"email":"sheerun@sher.pl","name":"sheerun"},{"email":"andremiguelcruz@msn.com","name":"satazor"},{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"time":{"modified":"2022-06-13T05:00:45.067Z","created":"2013-07-16T07:44:05.179Z","0.1.0-rc.1":"2013-07-16T07:44:08.409Z","0.1.0":"2013-07-23T20:02:21.674Z","0.2.0":"2013-07-29T22:14:44.422Z","0.2.1":"2013-08-20T20:49:18.786Z","0.2.2":"2014-06-24T09:13:15.327Z"},"author":{"name":"Twitter"},"repository":{"type":"git","url":"git://github.com/bower/endpoint-parser.git"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/bower/endpoint-parser/issues"},"homepage":"https://github.com/bower/endpoint-parser"}