{"name":"original","version":"1.0.2","description":"Generate the origin from an URL or check if two URL/Origins are the same","main":"index.js","scripts":{"100%":"istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100","test-travis":"istanbul cover _mocha --report lcovonly -- test.js","coverage":"istanbul cover _mocha -- test.js","watch":"mocha --watch test.js","test":"mocha test.js"},"repository":{"type":"git","url":"git+https://github.com/unshiftio/original.git"},"keywords":["origin","url","parse"],"author":{"name":"Arnout Kazemier"},"license":"MIT","dependencies":{"url-parse":"^1.4.3"},"devDependencies":{"assume":"~2.1.0","istanbul":"0.4.x","mocha":"~3.5.0","pre-commit":"~1.2.0"},"gitHead":"3a6b7dfc741587920f0cdd3aebe4e589bff0f7d3","bugs":{"url":"https://github.com/unshiftio/original/issues"},"homepage":"https://github.com/unshiftio/original#readme","_id":"original@1.0.2","_npmVersion":"6.1.0","_nodeVersion":"8.9.1","_npmUser":{"name":"3rdeden","email":"npm@3rd-Eden.com"},"dist":{"integrity":"sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==","shasum":"e442a61cffe1c5fd20a65f3261c26663b303f25f","tarball":"http://registry-npm.ywwl.com/original/download/original-1.0.2.tgz","fileCount":4,"unpackedSize":4796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaGytCRA9TVsSAnZWagAA5noP/2w8i+zQfUXNnSTCcc/x\n9exUswGdlz0qdZIdwvs00rAx4o5S8igwozTmgHgRvDdIxOswb1q3sVE9mRxR\nyl4TmQMoJKbHtHe9RU7ADjrVYJmW8kT9egk/fauEQ8eZcbvxuidzOdc6u7P6\nMP3rA89aZw338m/qN6LNQSQK/5eEw1ENtbqsqFzFqjH73JvRB7AsA8Zbekh0\nBtpOf7Jz75IYRp8L37CVZ4FmeLV3v6eTdicZpPS4d6JXP/tZy//Tx0nTMROJ\njjCYszR1ZYT9HAIoSMT1TnJ7bFAtXXsL+ptp+d3CNjBoke0MM3wPoywiLVxR\n5pByrZ7ad0IAp73uGvIVZQfgK8zEvMxS/Vx2VMVk+rN5eiLvR0u4fkztZW0d\nVmASyrmJ6JZMhj/K8i6u0H+1hQbDR9DoDU+xMckvO7FWFKd/WmO2SrkealPt\n18KW2vhl3ft7SgThVBRcr8ACjWUSBDFvXJgV1B0zGgJsInOCOSiV4Q0/bgif\nhL6hzCB1tblMlxyu0eZpFdTtth/GTvSIqcbeOupLugjMlcSyk26Ci032PAaN\nuUeg5dAYK5e66E5gI0t2b+1gU0s+dqUKSTpNEtvNXAAknverWFHmxnQHQ77K\nvIZ1h5BQoufIBq8wJBsbSG0uGvPjUHvkh1OQg03m6bE0Dh3296b4Uj0fm3Qp\nKO5v\r\n=RYkI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDERMTJpbv+d7ygBgFT8QnzwGDoTPsTK9EwaDwmZ7LmrAiEA/D33YaIMmBeIEMJ0qKSbTW463hCfVv85q4UhgrxN3xk="}],"size":2413,"noattachment":false,"key":"/original/-/original-1.0.2.tgz"},"maintainers":[{"email":"npm@3rd-Eden.com","name":"3rdeden"},{"email":"npm@unshift.io","name":"unshift"},{"email":"npm@3rd-Eden.com","name":"v1"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/original_1.0.2_1533570221121_0.20029329496915493"},"_hasShrinkwrap":false,"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":1533570221371,"_cnpm_publish_time":1533570221371,"dist-tags":{"latest":"1.0.2"}}