{"_id":"jsuri","_rev":"14-c7a9e19368d900865f400c684573477d","name":"jsuri","description":"Uri and query string manipulation","dist-tags":{"latest":"1.3.1"},"versions":{"1.2.2":{"author":{"name":"Derek Watson","email":"watson@dcw.ca","url":"http://dcw.ca"},"name":"jsuri","description":"Uri and query string manipulation","version":"1.2.2","homepage":"https://github.com/derek-watson/jsUri","repository":{"type":"git","url":"git://github.com/derek-watson/jsUri.git"},"keywords":["uri","url","query","path"],"main":"Uri","scripts":{"test":"jake test"},"dependencies":{},"devDependencies":{"jasmine-node":">= 1.0.26","jshint":">= 0.9.0","uglify-js":">= 1.3.3"},"optionalDependencies":{},"engines":{"node":"*"},"_id":"jsuri@1.2.2","dist":{"shasum":"0eccf151715fa833ed567c05b77c4eabf0b664db","tarball":"https://registry.npmjs.org/jsuri/-/jsuri-1.2.2.tgz","integrity":"sha512-C0MZwU30xFolcqvTEfQ0T4a022rwo+l7XiilLsE+Pe96ZMDPN9BEXRzkrEcYrRaENFFNiu6ysKGlU7jX42pYDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID4YX8/Rg4/0RZkUzSuKuH91TEzcvDa4ZrIOV91kh+ewAiEA5GfeKcBSUBdtYO8EL+7gsSwMWt9gTqiTpeehCIMLPuk="}]},"_npmVersion":"1.1.61","_npmUser":{"name":"dcw_ca","email":"watson@dcw.ca"},"maintainers":[{"name":"dcw_ca","email":"watson@dcw.ca"}]},"1.3.0-beta.1":{"name":"jsuri","description":"Uri and query string manipulation","version":"1.3.0-beta.1","author":{"name":"Derek Watson","email":"watson@dcw.ca","url":"http://dcw.ca"},"contributors":[{"name":"James M. Greene","email":"james.m.greene@gmail.com","url":"http://jamesgreene.net/"}],"homepage":"https://github.com/derek-watson/jsUri","repository":{"type":"git","url":"git://github.com/derek-watson/jsUri.git"},"keywords":["uri","url","query","path"],"main":"Uri","scripts":{"test":"./node_modules/.bin/mocha","lint":"./node_modules/.bin/jshint Uri.js","minify":"./node_modules/.bin/uglifyjs Uri.js > Uri.min.js"},"dependencies":{},"devDependencies":{"jshint":"~2.1.11","uglify-js":"~2.4.0","mocha":"~1.14.0","chai":"~1.8.1"},"optionalDependencies":{},"engines":{"node":"*"},"bugs":{"url":"https://github.com/derek-watson/jsUri/issues"},"_id":"jsuri@1.3.0-beta.1","dist":{"shasum":"ca4b1e94dd4ec55daaa5c7a5eb82c9a127603b14","tarball":"https://registry.npmjs.org/jsuri/-/jsuri-1.3.0-beta.1.tgz","integrity":"sha512-pK1hl5InmXbmihxFOLZUNvJSslcAyESrbFxrRJrElbfTeQYtNFGhQTZlW5yrcy5UbQz+XdE6N/G6P6wpbyLQyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIARcK1eYasrnP8nS4NVm1WK+U+LgDCz8FU3f6PtR7H8TAiEAzrDfYw5p6zHZ9UMQ6HtcSoo5a7oVZy7Gl1LwcD+DnUs="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"dcw_ca","email":"watson@dcw.ca"},"maintainers":[{"name":"dcw_ca","email":"watson@dcw.ca"},{"name":"jamesmgreene","email":"james.m.greene@gmail.com"}]},"1.3.0":{"name":"jsuri","description":"Uri and query string manipulation","version":"1.3.0","author":{"name":"Derek Watson","email":"watson@dcw.ca","url":"http://dcw.ca"},"contributors":[{"name":"James M. Greene","email":"james.m.greene@gmail.com","url":"http://jamesgreene.net/"}],"homepage":"https://github.com/derek-watson/jsUri","repository":{"type":"git","url":"git://github.com/derek-watson/jsUri.git"},"keywords":["uri","url","query","path"],"main":"Uri","scripts":{"test":"mocha","lint":"jshint Uri.js","minify":"uglifyjs Uri.js > Uri.min.js"},"dependencies":{},"devDependencies":{"jshint":"~2.1.11","uglify-js":"~2.4.0","mocha":"~1.14.0","chai":"~1.9.2"},"optionalDependencies":{},"engines":{"node":"*"},"jshintConfig":{"boss":true,"node":true,"smarttabs":true,"undef":true,"unused":true,"onecase":true,"lastsemic":true,"indent":2,"newcap":true,"noempty":true,"nonew":true,"nomen":true,"sub":false,"trailing":true,"white":false},"spm":{"main":"Uri.js"},"gitHead":"44797015cbdc4781054f9d051a3331bc4ac1cc14","bugs":{"url":"https://github.com/derek-watson/jsUri/issues"},"_id":"jsuri@1.3.0","_shasum":"4d48636a75dcd9adceba36544550d729c2e2fe37","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"dcw_ca","email":"watson@dcw.ca"},"maintainers":[{"name":"dcw_ca","email":"watson@dcw.ca"},{"name":"jamesmgreene","email":"james.m.greene@gmail.com"}],"dist":{"shasum":"4d48636a75dcd9adceba36544550d729c2e2fe37","tarball":"https://registry.npmjs.org/jsuri/-/jsuri-1.3.0.tgz","integrity":"sha512-vLrs5+sfYXITFJ6RZYL5OGkz04gmZ1lqRAW0XmiiX/1AfLc+RMfVKIL609jcMMyzNN3BR3nVfRu8cO6m/VeeSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTFM8XLunxLwdUHom5kfz8qKSiSZuOQp42el7mi7KWRwIgAipHShbFe8fXUR3JdnK5tvnDAe9SVjuXFAd1vXm741M="}]}},"1.3.1":{"name":"jsuri","description":"Uri and query string manipulation","version":"1.3.1","author":{"name":"Derek Watson","email":"watson@dcw.ca","url":"http://dcw.ca"},"contributors":[{"name":"James M. Greene","email":"james.m.greene@gmail.com","url":"http://jamesgreene.net/"}],"homepage":"https://github.com/derek-watson/jsUri","repository":{"type":"git","url":"git://github.com/derek-watson/jsUri.git"},"keywords":["uri","url","query","path"],"main":"Uri","scripts":{"test":"mocha","lint":"jshint Uri.js","minify":"uglifyjs Uri.js > Uri.min.js"},"dependencies":{},"devDependencies":{"jshint":"~2.1.11","uglify-js":"~2.4.0","mocha":"~1.14.0"},"optionalDependencies":{},"engines":{"node":"*"},"jshintConfig":{"boss":true,"node":true,"smarttabs":true,"undef":true,"unused":true,"onecase":true,"lastsemic":true,"indent":2,"newcap":true,"noempty":true,"nonew":true,"nomen":true,"sub":false,"trailing":true,"white":false},"spm":{"main":"Uri.js"},"gitHead":"3a4afcd3210d7e295d552c93cd9f9450b579f69c","bugs":{"url":"https://github.com/derek-watson/jsUri/issues"},"_id":"jsuri@1.3.1","_shasum":"cd93fc6a87b255142cb7b0f479f00517ab9395ed","_from":".","_npmVersion":"2.6.0","_nodeVersion":"1.4.1","_npmUser":{"name":"dcw_ca","email":"watson@dcw.ca"},"maintainers":[{"name":"dcw_ca","email":"watson@dcw.ca"},{"name":"jamesmgreene","email":"james.m.greene@gmail.com"}],"dist":{"shasum":"cd93fc6a87b255142cb7b0f479f00517ab9395ed","tarball":"https://registry.npmjs.org/jsuri/-/jsuri-1.3.1.tgz","integrity":"sha512-LLdAeqOf88/X0hylAI7oSir6QUsz/8kOW0FcJzzu/SJRfORA/oPHycAOthkNp7eLPlTAbqVDFbqNRHkRVzEA3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChGCpJk4asU8LcZHzdSAs5ocuYSObHQ9r0/G201GKf2wIgDOZGyPAfQSrgvmQWciud8DuG+ZtJazd7qMtWSPD9wYY="}]}}},"readme":"# jsUri\n\nURI parsing and manipulation for node.js and the browser.\n\n[![Build Status](https://travis-ci.org/derek-watson/jsUri.png)](https://travis-ci.org/derek-watson/jsUri)\n\n[![NPM](https://nodei.co/npm/jsuri.png)](https://nodei.co/npm/jsuri/)\n\n[![spm package](http://spmjs.io/badge/jsuri)](http://spmjs.io/package/jsuri)\n\nPass any URL into the constructor:\n\n```js\nvar uri = new Uri('http://user:pass@www.test.com:81/index.html?q=books#fragment')\n```\n\nUse property methods to get at the various parts:\n\n```js\nuri.protocol()    // http\nuri.userInfo()    // user:pass\nuri.host()        // www.test.com\nuri.port()        // 81\nuri.path()        // /index.html\nuri.query()       // q=books\nuri.anchor()      // fragment\n```\n\nProperty methods accept an optional value to set:\n\n```js\nuri.protocol('https')\nuri.toString()    // https://user:pass@www.test.com:81/index.html?q=books#fragment\n\nuri.host('mydomain.com')\nuri.toString()    // https://user:pass@mydomain.com:81/index.html?q=books#fragment\n```\n\nChainable setter methods help you compose strings:\n\n```js\nnew Uri()\n    .setPath('/archives/1979/')\n    .setQuery('?page=1')                   // /archives/1979?page=1\n\nnew Uri()\n    .setPath('/index.html')\n    .setAnchor('content')\n    .setHost('www.test.com')\n    .setPort(8080)\n    .setUserInfo('username:password')\n    .setProtocol('https')\n    .setQuery('this=that&some=thing')      // https://username:password@www.test.com:8080/index.html?this=that&some=thing#content\n\nnew Uri('http://www.test.com')\n    .setHost('www.yahoo.com')\n    .setProtocol('https')                  // https://www.yahoo.com\n```\n\n## Query param methods\n\nReturns the first query param value for the key:\n\n```js\nnew Uri('?cat=1&cat=2&cat=3').getQueryParamValue('cat')             // 1\n```\n\nReturns all query param values for the given key:\n\n```js\nnew Uri('?cat=1&cat=2&cat=3').getQueryParamValues('cat')            // [1, 2, 3]\n```\n\nInternally, query key/value pairs are stored as a series of two-value arrays in the Query object:\n\n```js\nnew Uri('?a=b&c=d').query().params                  // [ ['a', 'b'], ['c', 'd']]\n```\n\nAdd query param values:\n\n```js\nnew Uri().addQueryParam('q', 'books')               // ?q=books\n\nnew Uri('http://www.github.com')\n    .addQueryParam('testing', '123')\n    .addQueryParam('one', 1)                        // http://www.github.com/?testing=123&one=1\n\n// insert param at index 0\nnew Uri('?b=2&c=3&d=4').addQueryParam('a', '1', 0)  // ?a=1&b=2&c=3&d=4\n```\n\nReplace every query string parameter named `key` with `newVal`:\n\n```js\nnew Uri().replaceQueryParam('page', 2)     // ?page=2\n\nnew Uri('?a=1&b=2&c=3')\n    .replaceQueryParam('a', 'eh')          // ?a=eh&b=2&c=3\n\nnew Uri('?a=1&b=2&c=3&c=4&c=5&c=6')\n    .replaceQueryParam('c', 'five', '5')   // ?a=1&b=2&c=3&c=4&c=five&c=6\n```\n\nRemoves instances of query parameters named `key`:\n\n```js\nnew Uri('?a=1&b=2&c=3')\n    .deleteQueryParam('a')                 // ?b=2&c=3\n\nnew Uri('test.com?a=1&b=2&c=3&a=eh')\n    .deleteQueryParam('a', 'eh')           // test.com/?a=1&b=2&c=3\n```\n\nTest for the existence of query parameters named `key`:\n\n```js\nnew Uri('?a=1&b=2&c=3')\n    .hasQueryParam('a')                    // true\n\nnew Uri('?a=1&b=2&c=3')\n    .hasQueryParam('d')                    // false\n```\n\nCreate an identical URI object with no shared state:\n\n```js\nvar baseUri = new Uri('http://localhost/')\n\nbaseUri.clone().setProtocol('https')   // https://localhost/\nbaseUri                                // http://localhost/\n```\n\nThis project incorporates the [parseUri](http://blog.stevenlevithan.com/archives/parseuri) regular expression by Steven Levithan.\n","maintainers":[{"email":"james.m.greene@gmail.com","name":"jamesmgreene"},{"email":"watson@dcw.ca","name":"dcw_ca"}],"time":{"modified":"2022-06-19T07:07:38.373Z","created":"2012-09-24T14:17:22.215Z","1.2.2":"2012-09-24T14:17:22.773Z","1.3.0-beta.1":"2013-12-02T13:42:06.828Z","1.3.0":"2014-12-18T16:44:30.994Z","1.3.1":"2015-04-15T20:04:18.917Z"},"author":{"name":"Derek Watson","email":"watson@dcw.ca","url":"http://dcw.ca"},"repository":{"type":"git","url":"git://github.com/derek-watson/jsUri.git"},"users":{"dknell":true,"yasinaydin":true},"homepage":"https://github.com/derek-watson/jsUri","keywords":["uri","url","query","path"],"contributors":[{"name":"James M. Greene","email":"james.m.greene@gmail.com","url":"http://jamesgreene.net/"}],"bugs":{"url":"https://github.com/derek-watson/jsUri/issues"},"readmeFilename":"README.md"}