{"name":"original","version":"1.0.0","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.0.x"},"devDependencies":{"assume":"1.3.x","istanbul":"0.4.x","mocha":"2.3.x","pre-commit":"1.1.x"},"gitHead":"ee5fb8a2bad22c67a64337897e0505d94cb23b6b","bugs":{"url":"https://github.com/unshiftio/original/issues"},"homepage":"https://github.com/unshiftio/original#readme","_id":"original@1.0.0","_shasum":"9147f93fa1696d04be61e01bd50baeaca656bd3b","_from":".","_npmVersion":"2.14.3","_nodeVersion":"0.12.3","_npmUser":{"name":"3rdeden","email":"npm@3rd-Eden.com"},"maintainers":[{"name":"unshift","email":"npm@unshift.io"},{"name":"v1","email":"info@3rd-Eden.com"},{"name":"3rdeden","email":"npm@3rd-Eden.com"}],"dist":{"shasum":"9147f93fa1696d04be61e01bd50baeaca656bd3b","tarball":"http://registry-npm.ywwl.com/original/download/original-1.0.0.tgz","integrity":"sha512-uSGdLwcsvxUcF9GuxWpO3Aji9aWbuvUvVkjOgc1QF5FUxa1dh3uwLW7IyBilw5teR3odBp16PPO2tGKyCsDdfw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH8kSdVKFIEKVnzBz6EAULx/qQvgnKKJZNobiYONawYNAiEAhw3GnowGnn2O8wEwHAkK7u88FEcbZ8106NJ+a5NUXeQ="}],"size":3176,"noattachment":false,"key":"/original/-/original-1.0.0.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":1446216259667,"_cnpm_publish_time":1446216259667,"dist-tags":{"latest":"1.0.2"}}