{"name":"original","version":"0.0.6","description":"Generate the origin from an URL or check if two URL/Origins are the same","main":"index.js","scripts":{"test":"mocha --reporter spec --ui bdd test.js","coverage":"istanbul cover ./node_modules/.bin/_mocha -- --reporter spec --ui bdd test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --ui bdd test.js"},"repository":{"type":"git","url":"https://github.com/unshiftio/original"},"keywords":["origin","url","parse"],"author":{"name":"Arnout Kazemier"},"license":"MIT","dependencies":{"requires-port":"0.0.x","url-parse":"0.1.x"},"devDependencies":{"assume":"0.0.x","istanbul":"0.3.x","mocha":"2.0.x","pre-commit":"0.0.x"},"gitHead":"c91daa8551a1176a875492c9c6f0e8fb9ff08454","bugs":{"url":"https://github.com/unshiftio/original/issues"},"homepage":"https://github.com/unshiftio/original","_id":"original@0.0.6","_shasum":"079677f0217c6c384650b7ab70094fd095b0a2e7","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"V1","email":"info@3rd-Eden.com"},"maintainers":[{"name":"V1","email":"info@3rd-Eden.com"},{"name":"unshift","email":"npm@unshift.io"}],"dist":{"shasum":"079677f0217c6c384650b7ab70094fd095b0a2e7","tarball":"http://registry-npm.ywwl.com/original/download/original-0.0.6.tgz","integrity":"sha512-4JC3QN9pF5Wcz+yPDmTUKY9c4+w6skohLEmsPGfC8RDznlQppe9dQNgtHHftE29pJ9lhnY50LNK0iEBkJFQVXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvkbR8YoZ83IeIpuJOkHe3sbwd5lEg/LHLiyS2SaflfQIgZ8yfeXH+2dVEX7H28IEgCMnt9I3nxGYwqITm2iv0DRw="}],"size":2673,"noattachment":false,"key":"/original/-/original-0.0.6.tgz"},"directories":{},"readme":"# origin(al)\n\n[![Made by unshift](https://img.shields.io/badge/made%20by-unshift-00ffcc.svg?style=flat-square)](http://unshift.io)[![Version npm](http://img.shields.io/npm/v/original.svg?style=flat-square)](http://browsenpm.org/package/original)[![Build Status](http://img.shields.io/travis/unshiftio/original/master.svg?style=flat-square)](https://travis-ci.org/unshiftio/original)[![Dependencies](https://img.shields.io/david/unshiftio/original.svg?style=flat-square)](https://david-dm.org/unshiftio/original)[![Coverage Status](http://img.shields.io/coveralls/unshiftio/original/master.svg?style=flat-square)](https://coveralls.io/r/unshiftio/original?branch=master)[![IRC channel](http://img.shields.io/badge/IRC-irc.freenode.net%23unshift-00a8ff.svg?style=flat-square)](http://webchat.freenode.net/?channels=unshift)\n\nOriginal generates the origin URL for a given URL or URL object. In addition to\nthat it also comes with a simple `same` function to check if two URL's have the\nsame origin.\n\n## Install\n\nThis module is browserify and node compatible and is therefor release in the npm\nregistry and can be installed using:\n\n```\nnpm install --save original\n```\n\n## Usage\n\nIn all the examples we assume that the module is loaded using:\n\n```js\n'use strict';\n\nvar origin = require('original');\n```\n\nTo get the origin of a given URL simply call `origin` function with any given\nURL to get origin.\n\n```js\nvar o = origin('https://google.com/foo/bar?path');\n\n// o = https://google.com\n```\n\nTo compare if two URL's share the same origin you can call the `same` method.\n\n```js\nif (origin.same('https://google.com/foo', 'https://primus.io')) {\n  console.log('same');\n} else {\n  console.log('guess what, google.com and primus.io are not the same origin');\n}\n```\n\nAnd that's it.\n\n## License\n\nMIT\n","publish_time":1415574241366,"_cnpm_publish_time":1415574241366,"dist-tags":{"latest":"1.0.2"}}