{"name":"original","version":"1.0.1","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.0"},"devDependencies":{"assume":"~2.0.1","istanbul":"0.4.x","mocha":"~3.5.0","pre-commit":"~1.2.0"},"gitHead":"f060834a29628284c0c7964c4c789406400a4e80","bugs":{"url":"https://github.com/unshiftio/original/issues"},"homepage":"https://github.com/unshiftio/original#readme","_id":"original@1.0.1","_npmVersion":"6.0.0","_nodeVersion":"8.9.1","_npmUser":{"name":"3rdeden","email":"npm@3rd-Eden.com"},"dist":{"integrity":"sha512-IEvtB5vM5ULvwnqMxWBLxkS13JIEXbakizMSo3yoPNPCIWzg8TG3Usn/UhXoZFM/m+FuEA20KdzPSFq/0rS+UA==","shasum":"b0a53ff42ba997a8c9cd1fb5daaeb42b9d693190","tarball":"http://registry-npm.ywwl.com/original/download/original-1.0.1.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\nwsFcBAEBCAAQBQJa+rCtCRA9TVsSAnZWagAAnZQQAJy3HVH2YR3e8iJ/RvVQ\n7edwqIZ2EISxqg3UoRS/bNI5PBkjh04DLNHvxDKOQMbfbX8sxGScyg8x2muC\ntmdCueeBAxs5v85sQNcPTWNdOCL8Dy/xURdbfTYZZ+ewXUYBSN8Bq3g4SOUL\nI/xVcKHzMFnHF5l/iOOk3VA2N1y07hhnVmIDR53y8ff/HhzKr/AF1Myn7bNU\nfF2FOIAPIyt2zd2CXdHus3Fo3wnU4FzaIIagDQ8XJD8HO0fu9MctJ9qjrKwt\niPRHEwc4uUw8/9eBljZNjRvUpvJvTWaf0MB5+WMLkEwEbARHCEQ1X+Zuv68t\n2B7RpuhCd6S+eKN6qfqHpvo+qryFrHtGFXKMmwlIunhFeT9mTtudEXgOp8NY\nYVYqeDoRHgq17GCsUTrx6fEdcOrMp9CEC0bZG179PXlc481DssFzJPBOsp2Z\nW8hxvwoTZzNiu27pIRak9yeFurUYkLLNTBQy+doq3OY+i4rTpcg7x7BZUnob\nf659IB1spGVlArPfmbkfZyBxy4Vh3NyPIUB3MZHrLJs0zUn+TEoDmnGVwlBG\nNa4+62eS/kthZMlZEYhP/Hgmnzt8pFk0M4v7DGIfZc2t8K/GTAYiHnaR/CG7\nJGo685005ZMiXdibDAyTljLU8DxRJk1+9XTacWkb8wxi3AiDlY3t9OY+8BY1\ntmEL\r\n=y8bg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSX8d/KNqkGMM1lUQFSnos7VahV8AMTCyatqhEc6+9ogIgcAuQc2bY3ZgOHKb9fV9aBadqB3dUkFB9ZesI7mOve/c="}],"size":2408,"noattachment":false,"key":"/original/-/original-1.0.1.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.1_1526378667540_0.16775711344228372"},"_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":1526378667637,"_cnpm_publish_time":1526378667637,"dist-tags":{"latest":"1.0.2"}}