{"_id":"strange","_rev":"16-c1a5a1cc17b13422388dc18b6f660843","name":"strange","description":"Range aka interval object. Supports exclusive and infinite ranges. Comes with an interval tree (augmented binary search tree).","dist-tags":{"latest":"1.7.2"},"versions":{"0.1.337":{"name":"strange","version":"0.1.337","description":"Range object. Will supports proper exclusive and infinite ranges in the future!","keywords":["range","ranges","interval","integer","integers","sort","bounds","math"],"homepage":"https://github.com/moll/js-strange","bugs":{"url":"https://github.com/moll/js-strange/issues"},"author":{"name":"Andri Möll","email":"andri@dot.ee","url":"http://themoll.com"},"repository":{"type":"git","url":"git://github.com/moll/js-strange.git"},"licenses":[{"type":"LAGPL","url":"https://github.com/moll/js-strange/blob/master/LICENSE"}],"main":"index.js","scripts":{"test":"make test"},"devDependencies":{"mocha":">= 1.12.0 < 2","must":"< 2"},"_id":"strange@0.1.337","dist":{"shasum":"1ab3c2e3f4f9e9b415b75bcfdf4901bbf0f9fd39","tarball":"https://registry.npmjs.org/strange/-/strange-0.1.337.tgz","integrity":"sha512-2rf9acb0K5aBsENh+ant3DssDVk0ua4zdbQ9jyNPXQPiQOfdsrSsoOwoGA/LCgxFJtz/qPGEhDW148MoWaMpRg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoNdXXaxwSgR+fblhEEW7KEgsdNevInMO+IwbB8rPecgIgboN6RA5V3KoZ9Gh2PRjN8cUiVo1UszPooi9gb5bgW00="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"moll","email":"andri@dot.ee"},"maintainers":[{"name":"moll","email":"andri@dot.ee"}]},"1.0.0":{"name":"strange","version":"1.0.0","description":"Range object. Supports exclusive and infinite ranges.","keywords":["range","ranges","interval","integer","integers","sort","bounds","math"],"homepage":"https://github.com/moll/js-strange","bugs":{"url":"https://github.com/moll/js-strange/issues"},"author":{"name":"Andri Möll","email":"andri@dot.ee","url":"http://themoll.com"},"repository":{"type":"git","url":"git://github.com/moll/js-strange.git"},"licenses":[{"type":"LAGPL","url":"https://github.com/moll/js-strange/blob/master/LICENSE"}],"main":"index.js","scripts":{},"devDependencies":{"mocha":">= 1.12.0 < 2","must":"< 2"},"gitHead":"9495fd73eb74690bbb4850254457a1653b06c066","_id":"strange@1.0.0","_shasum":"19accabf42c07d8a9bd49583ecf1fc531b41bbec","_from":".","_npmVersion":"2.7.6","_nodeVersion":"0.12.2","_npmUser":{"name":"moll","email":"andri@dot.ee"},"maintainers":[{"name":"moll","email":"andri@dot.ee"}],"dist":{"shasum":"19accabf42c07d8a9bd49583ecf1fc531b41bbec","tarball":"https://registry.npmjs.org/strange/-/strange-1.0.0.tgz","integrity":"sha512-9q2fAk/oZAmSvDCUQMZyP9Bis2lZAfSWtjMBhTpXepEUbudtIm+kiyCNQOKBIJNkK+RZska4xavG3t9GxEm3Ew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICZKjt8lXaNWBXRZ/GgECCAJh3xz14c7AiIa7M4zFjc8AiEA0P+ZIQoBUmU/lUr0Ej/2jlZtfY81kDWfDJiNgdAXj8g="}]}},"1.1.0":{"name":"strange","version":"1.1.0","description":"Range object. Supports exclusive and infinite ranges.","keywords":["range","ranges","interval","integer","integers","sort","bounds","math"],"homepage":"https://github.com/moll/js-strange","bugs":{"url":"https://github.com/moll/js-strange/issues"},"author":{"name":"Andri Möll","email":"andri@dot.ee","url":"http://themoll.com"},"repository":{"type":"git","url":"git://github.com/moll/js-strange.git"},"licenses":[{"type":"LAGPL","url":"https://github.com/moll/js-strange/blob/master/LICENSE"}],"main":"index.js","scripts":{},"devDependencies":{"mocha":">= 2.0.0 < 3","must":">= 0.12.0 < 0.13"},"gitHead":"6af433692772438bf54cf70122f438a3d275eeb9","_id":"strange@1.1.0","_shasum":"6fc2de65db7c8963422c4d4e13f289bf799eadb3","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"moll","email":"andri@dot.ee"},"maintainers":[{"name":"moll","email":"andri@dot.ee"}],"dist":{"shasum":"6fc2de65db7c8963422c4d4e13f289bf799eadb3","tarball":"https://registry.npmjs.org/strange/-/strange-1.1.0.tgz","integrity":"sha512-7n9cYGOL5bkowONp9poEz8IUfQtJx1m3wvG5ppDOyrCZBBP9yScCoPp89L8uOxiqPnfM8eW42gxP94zlxbL6DQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDm+z/8x6dvs0lSeNnXbAutEHQ8ONBgUi4lPjqULwcjJQIhAPj4J6fKPzPhll05gbSnZk2G/2Y3k1aShMPkKsylBNVU"}]}},"1.2.0":{"name":"strange","version":"1.2.0","description":"Range object. Supports exclusive and infinite ranges.","keywords":["range","ranges","interval","integer","integers","sort","bounds","math"],"homepage":"https://github.com/moll/js-strange","bugs":{"url":"https://github.com/moll/js-strange/issues"},"author":{"name":"Andri Möll","email":"andri@dot.ee","url":"http://themoll.com"},"repository":{"type":"git","url":"git://github.com/moll/js-strange.git"},"licenses":[{"type":"LAGPL","url":"https://github.com/moll/js-strange/blob/master/LICENSE"}],"main":"index.js","scripts":{},"devDependencies":{"mocha":">= 2.0.0 < 3","must":">= 0.12.0 < 0.13"},"gitHead":"dc1b84120e554e8d540c9be3ec900c7366d9e9b6","_id":"strange@1.2.0","_shasum":"00d8510530a781d7dfd36185784b88815c6c07b1","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"moll","email":"andri@dot.ee"},"maintainers":[{"name":"moll","email":"andri@dot.ee"}],"dist":{"shasum":"00d8510530a781d7dfd36185784b88815c6c07b1","tarball":"https://registry.npmjs.org/strange/-/strange-1.2.0.tgz","integrity":"sha512-q9lGihHt8zYY5SUK1dUwJUh5/blH6t285oekhwRM7xj3uhhmk1M8oeD1x5W6RrJfAOeVoqe+UhFeIjhq5XHpfw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEt2KXikAK6cN2w5S5vJPxYlBo/F6RY6ylGHem4ZN9BVAiBEcID6cQMLDsEoeBKchY+LNGlnokMj+jtQV+yOip4h8w=="}]}},"1.3.0":{"name":"strange","version":"1.3.0","description":"Range aka interval object. Supports exclusive and infinite ranges.","keywords":["range","ranges","interval","integer","integers","sort","bounds","math"],"homepage":"https://github.com/moll/js-strange","bugs":{"url":"https://github.com/moll/js-strange/issues"},"author":{"name":"Andri Möll","email":"andri@dot.ee","url":"http://themoll.com"},"repository":{"type":"git","url":"git://github.com/moll/js-strange.git"},"licenses":[{"type":"LAGPL","url":"https://github.com/moll/js-strange/blob/master/LICENSE"}],"main":"index.js","scripts":{},"devDependencies":{"mocha":">= 2.0.0 < 3","must":">= 0.12.0 < 0.13"},"gitHead":"ea23eda14d202cb15a7e9ab0b0969a0ac60fe1a4","_id":"strange@1.3.0","_shasum":"86a4ee1484007ac7f7ff47626645fdc2b9eb7f0b","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"moll","email":"andri@dot.ee"},"maintainers":[{"name":"moll","email":"andri@dot.ee"}],"dist":{"shasum":"86a4ee1484007ac7f7ff47626645fdc2b9eb7f0b","tarball":"https://registry.npmjs.org/strange/-/strange-1.3.0.tgz","integrity":"sha512-sid05EzihaNBnVMHFBF5mlPQkTbUY0IihQSjZMU3fvuu+vtEVicQ1Or5/xYKtzJiM2XphlKPwZL0ionPPfVDOA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0wVoAK8gYhFTqkWHdexouZhEsXWWGcevm3a+4YK6GOQIhANoDO/dy/rqw8xl9zKDn/DMvjfW/GmYv58ofeOau9A9E"}]}},"1.4.0":{"name":"strange","version":"1.4.0","description":"Range aka interval object. Supports exclusive and infinite ranges.","keywords":["range","ranges","interval","integer","integers","sort","bounds","math"],"homepage":"https://github.com/moll/js-strange","bugs":{"url":"https://github.com/moll/js-strange/issues"},"author":{"name":"Andri Möll","email":"andri@dot.ee","url":"http://themoll.com"},"repository":{"type":"git","url":"git://github.com/moll/js-strange.git"},"licenses":[{"type":"LAGPL","url":"https://github.com/moll/js-strange/blob/master/LICENSE"}],"main":"index.js","scripts":{},"devDependencies":{"mocha":">= 2.0.0 < 3","must":">= 0.12.0 < 0.13"},"gitHead":"2e9fcc6cc2c1a594cebb3d3976a461f285897c9c","_id":"strange@1.4.0","_shasum":"984a72e7e780f6df3337c9e23f565f3dae655dd7","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.3.0","_npmUser":{"name":"moll","email":"andri@dot.ee"},"maintainers":[{"name":"moll","email":"andri@dot.ee"}],"dist":{"shasum":"984a72e7e780f6df3337c9e23f565f3dae655dd7","tarball":"https://registry.npmjs.org/strange/-/strange-1.4.0.tgz","integrity":"sha512-kRCQOQVLqwS0+7T/NdU6muVjwbIfQRRxklCwIus0PjO6Mq06SvSic2p1OgqSAviWCV2r+iLF/m6YH9q+LluDYA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDraoD/njVGgRvKm/D2uAvXqAesd2yAEZPhWnak+866uQIgaZQRkpExT84+ddNrQX6ewMgZ52kooLHgEIjjDznEkKg="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/strange-1.4.0.tgz_1467962329209_0.23596779350191355"}},"1.5.0":{"name":"strange","version":"1.5.0","description":"Range aka interval object. Supports exclusive and infinite ranges.","keywords":["range","ranges","interval","integer","integers","sort","bounds","math"],"homepage":"https://github.com/moll/js-strange","bugs":{"url":"https://github.com/moll/js-strange/issues"},"author":{"name":"Andri Möll","email":"andri@dot.ee","url":"http://themoll.com"},"repository":{"type":"git","url":"git://github.com/moll/js-strange.git"},"licenses":[{"type":"LAGPL","url":"https://github.com/moll/js-strange/blob/master/LICENSE"}],"main":"index.js","scripts":{},"devDependencies":{"mocha":">= 2.0.0 < 3","must":">= 0.13.0 < 0.14"},"gitHead":"7b25656e647b45596b4d6ecd572acef25c0ed4f2","_id":"strange@1.5.0","_shasum":"8554fe8b03ad1a0d57fd6a2576d237902e9be8fa","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.3.0","_npmUser":{"name":"moll","email":"andri@dot.ee"},"maintainers":[{"name":"moll","email":"andri@dot.ee"}],"dist":{"shasum":"8554fe8b03ad1a0d57fd6a2576d237902e9be8fa","tarball":"https://registry.npmjs.org/strange/-/strange-1.5.0.tgz","integrity":"sha512-ERby4JfdmREuBBeT6oFDFthpEJZ9p/paWiDVE1DqD6q8q7QRBiYvauXvF4YkcFhtvK+tcRDwo3ZSKfpXC88OrA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPWm6S+wZASMC7rfBlPM4GkdodWvVIHe42BOuXmkGlIgIhAJgKTk/8nyU4gJFM/KtAfrW5u21o/l2g8a3Y0fb8gaNd"}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/strange-1.5.0.tgz_1468308303117_0.7088864324614406"}},"1.6.0":{"name":"strange","version":"1.6.0","description":"Range aka interval object. Supports exclusive and infinite ranges. Comes with an interval tree (augmented binary search tree).","keywords":["range","ranges","interval","interval-tree","bst","integer","integers","sort","bounds","math"],"homepage":"https://github.com/moll/js-strange","bugs":{"url":"https://github.com/moll/js-strange/issues"},"author":{"name":"Andri Möll","email":"andri@dot.ee","url":"http://themoll.com"},"repository":{"type":"git","url":"git://github.com/moll/js-strange.git"},"licenses":[{"type":"LAGPL","url":"https://github.com/moll/js-strange/blob/master/LICENSE"}],"main":"index.js","scripts":{},"devDependencies":{"mocha":">= 2.0.0 < 3","must":">= 0.13.0 < 0.14"},"gitHead":"eab968bc9d54a88944c3417b2b960a606c2fb05a","_id":"strange@1.6.0","_shasum":"2ead79f3d3806e7a1f1b2361ceb35660f19b0a31","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"moll","email":"andri@dot.ee"},"maintainers":[{"name":"moll","email":"andri@dot.ee"}],"dist":{"shasum":"2ead79f3d3806e7a1f1b2361ceb35660f19b0a31","tarball":"https://registry.npmjs.org/strange/-/strange-1.6.0.tgz","integrity":"sha512-+KMl8/ULNjDLv0drSYUOJ10xuNJmaj71vTCrZF1t0EASjatyWuGwV+1Iujr9f8raaKdUow+AO5xsKv0O08sz1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUgOMdTC2XTKJaBv2eDom/2dDSImLioYNXRJYsIDTdegIhAJIysI2bvJZMsOpEiwZ+gnI69LxeOpzTG5bkSV6guk07"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/strange-1.6.0.tgz_1470421381034_0.49318628711625934"}},"1.7.0":{"name":"strange","version":"1.7.0","description":"Range aka interval object. Supports exclusive and infinite ranges. Comes with an interval tree (augmented binary search tree).","keywords":["range","ranges","interval","interval-tree","bst","integer","integers","sort","bounds","math"],"homepage":"https://github.com/moll/js-strange","bugs":{"url":"https://github.com/moll/js-strange/issues"},"author":{"name":"Andri Möll","email":"andri@dot.ee","url":"http://themoll.com"},"repository":{"type":"git","url":"git://github.com/moll/js-strange.git"},"licenses":[{"type":"LAGPL","url":"https://github.com/moll/js-strange/blob/master/LICENSE"}],"main":"index.js","scripts":{},"devDependencies":{"mocha":">= 2.0.0 < 3","must":">= 0.13.0 < 0.14"},"gitHead":"ea1cba22aff74aed71e3fd0f2ea849a54746ca33","_id":"strange@1.7.0","_shasum":"c35e5694a8aae786bb70faa491dbe90efd970868","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"moll","email":"andri@dot.ee"},"maintainers":[{"name":"moll","email":"andri@dot.ee"}],"dist":{"shasum":"c35e5694a8aae786bb70faa491dbe90efd970868","tarball":"https://registry.npmjs.org/strange/-/strange-1.7.0.tgz","integrity":"sha512-yO7EymU4VtLWrs29tRbvWPTeqMs04FUFx3J9soJv95WzoYqgYzAHsUxkyARH0toOSnNLBOknLUTNd9L0c3DoKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHAR32du2odkLL8jeuLpnPhBUu/as/zRTNYSs58KFo52AiEAmueLa5QrcTheEdTFtLV+vDNbgS4RrDjVXkD9p4MjBnE="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/strange-1.7.0.tgz_1470422469714_0.9380095249507576"}},"1.7.1":{"name":"strange","version":"1.7.1","description":"Range aka interval object. Supports exclusive and infinite ranges. Comes with an interval tree (augmented binary search tree).","keywords":["range","ranges","interval","interval-tree","bst","integer","integers","sort","bounds","math"],"homepage":"https://github.com/moll/js-strange","bugs":{"url":"https://github.com/moll/js-strange/issues"},"author":{"name":"Andri Möll","email":"andri@dot.ee","url":"http://themoll.com"},"repository":{"type":"git","url":"git://github.com/moll/js-strange.git"},"licenses":[{"type":"LAGPL","url":"https://github.com/moll/js-strange/blob/master/LICENSE"}],"main":"index.js","scripts":{},"devDependencies":{"mocha":">= 2.0.0 < 3","must":">= 0.13.0 < 0.14"},"gitHead":"51458808d97af3fcb6abbfa0d7c06cefbed98ac3","_id":"strange@1.7.1","_shasum":"5227c672b06b36bd15838fc6af44fa7d3978e205","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.6.1","_npmUser":{"name":"moll","email":"andri@dot.ee"},"maintainers":[{"name":"moll","email":"andri@dot.ee"}],"dist":{"shasum":"5227c672b06b36bd15838fc6af44fa7d3978e205","tarball":"https://registry.npmjs.org/strange/-/strange-1.7.1.tgz","integrity":"sha512-QZca/cJlRS0QbKMLQjdL2A2UZ+LdrC9LGK7zxwn7lDL4tREiYNijcldwYBXXY/20nXF9zkj6ezpiN6oukdCwSQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDb7v7oDJgzLnLUSogPTt0NH+ms3i8bhzX91PbwUgpFvwIgV2/AVMqII9qsvd+KlE0N7Fq8lABDpF5iR5/GJ2pszdw="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/strange-1.7.1.tgz_1484505236198_0.5130598086398095"}},"1.7.2":{"name":"strange","version":"1.7.2","description":"Range aka interval object. Supports exclusive and infinite ranges. Comes with an interval tree (augmented binary search tree).","keywords":["range","ranges","interval","interval-tree","bst","integer","integers","sort","bounds","math"],"homepage":"https://github.com/moll/js-strange","bugs":{"url":"https://github.com/moll/js-strange/issues"},"author":{"name":"Andri Möll","email":"andri@dot.ee","url":"http://themoll.com"},"repository":{"type":"git","url":"git://github.com/moll/js-strange.git"},"licenses":[{"type":"LAGPL","url":"https://github.com/moll/js-strange/blob/master/LICENSE"}],"main":"index.js","scripts":{},"devDependencies":{"mocha":">= 2.0.0 < 3","must":">= 0.13.0 < 0.14"},"gitHead":"dd985b70ca8d5e5bcaf6367094ea19d4396e99df","_id":"strange@1.7.2","_shasum":"bcefaecc37d7637ccb76c2eb0724b36b4e7014de","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"moll","email":"andri@dot.ee"},"maintainers":[{"name":"moll","email":"andri@dot.ee"}],"dist":{"shasum":"bcefaecc37d7637ccb76c2eb0724b36b4e7014de","tarball":"https://registry.npmjs.org/strange/-/strange-1.7.2.tgz","integrity":"sha512-7IUeTFy/dy3oAzTjeFp5bqp6n2aLYiUzTRxZLS4kdMZsfVyFyIGZnFHp+IL2nXROXvXN6RnVXmb4nwztlLYtJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIANlBvD8jY3QXik40oeNfH/1tETuxTpIDyKFAWavYBAxAiBo/829BscE1nr+2BxVKPBa8+P4X5D9UrtAz+RSQmYpGg=="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/strange-1.7.2.tgz_1487755050407_0.7242302766535431"}}},"readme":"stRange.js\n==========\n[![NPM version][npm-badge]](https://www.npmjs.com/package/strange)\n[![Build status][travis-badge]](https://travis-ci.org/moll/js-strange)\n\nstRange.js is a **range object** for JavaScript. Use it to have a single value\ntype with two endpoints and their boundaries. Also implements an interval tree\nfor quick lookups. Stringifies itself in the style of `[begin,end)` and allows\nyou to parse a string back. Also useful with PostgreSQL.\n\n[npm-badge]: https://img.shields.io/npm/v/strange.svg\n[travis-badge]: https://travis-ci.org/moll/js-strange.png?branch=master\n\n\nInstalling\n----------\nstRange.js follows [semantic versioning](http://semver.org/), so feel free to\ndepend on its major version with something like `>= 1.0.0 < 2` (a.k.a `^1.0.0`).\n\n### Installing on Node.js\n```\nnpm install strange\n```\n\n### Installing for the browser\nstRange.js doesn't yet have a build ready for the browser, but you might be able\nto use [Browserify][browserify] to have it run there till then.\n\n[browserify]: https://github.com/substack/node-browserify\n\n\nUsing\n-----\nCreate a Range object by passing in a beginning and end:\n```javascript\nvar Range = require(\"strange\")\nvar range = new Range(1, 5)\n```\n\nCheck if something is a range and use it:\n```javascript\nvar Range = require(\"strange\")\nif (range instanceof Range) console.log(range.begin, range.end)\n```\n\n### Bounds\nYou can set a range's bounds by passing the bounds as a two-character string of\nparentheses as the 3rd argument:\n```javascript\nnew Range(1, 3, \"[)\")\n```\n\nBounds signify whether the range includes or excludes that particular endpoint.\nThe range above therefore includes numbers `>= 1 < 3`.\n\nPair | Meaning\n-----|--------\n`()` | open\n`[]` | closed\n`[)` | left-closed, right-open\n`(]` | left-open, right-closed\n\n\n### Parsing\nTo parse a range stringified by `Range.prototype.toString`, pass it to\n`Range.parse`:\n\n```javascript\nRange.parse(\"[a,z)\") // => new Range(\"a\", \"z\", \"[)\")\n```\n\nTo have stRange.js also parse the endpoints, pass a function to `Range.parse`:\n```javascript\nRange.parse(\"[42,69]\", Number) // => new Range(42, 69)\n```\n\n### Using with PostgreSQL\nThe string format used by stRange.js matches [PostgreSQL's range type\nformat](http://www.postgresql.org/docs/9.4/static/rangetypes.html). You can\ntherefore use stRange.js to parse and stringify ranges for your database.\n\n\nAPI\n---\nFor extended documentation on all functions, please see the\n[stRange.js API Documentation][api].\n\n[api]: https://github.com/moll/js-strange/blob/master/doc/API.md\n\n### [Range](https://github.com/moll/js-strange/blob/master/doc/API.md#Range)\n- [begin](https://github.com/moll/js-strange/blob/master/doc/API.md#range.begin)\n- [bounds](https://github.com/moll/js-strange/blob/master/doc/API.md#range.bounds)\n- [end](https://github.com/moll/js-strange/blob/master/doc/API.md#range.end)\n- [.prototype.compareBegin](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.prototype.compareBegin)(begin)\n- [.prototype.compareEnd](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.prototype.compareEnd)(end)\n- [.prototype.contains](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.prototype.contains)(value)\n- [.prototype.intersects](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.prototype.intersects)(other)\n- [.prototype.isBounded](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.prototype.isBounded)()\n- [.prototype.isEmpty](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.prototype.isEmpty)()\n- [.prototype.isFinite](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.prototype.isFinite)()\n- [.prototype.isInfinite](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.prototype.isInfinite)()\n- [.prototype.isUnbounded](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.prototype.isUnbounded)()\n- [.prototype.toJSON](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.prototype.toJSON)()\n- [.prototype.toString](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.prototype.toString)()\n- [.prototype.valueOf](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.prototype.valueOf)()\n- [.compareBeginToBegin](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.compareBeginToBegin)(a, b)\n- [.compareBeginToEnd](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.compareBeginToEnd)(a, b)\n- [.compareEndToEnd](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.compareEndToEnd)(a, b)\n- [.parse](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.parse)(range, [parseEndpoint])\n- [.union](https://github.com/moll/js-strange/blob/master/doc/API.md#Range.union)(union, a, b)\n\n### [RangeTree](https://github.com/moll/js-strange/blob/master/doc/API.md#RangeTree)\n- [.prototype.search](https://github.com/moll/js-strange/blob/master/doc/API.md#RangeTree.prototype.search)(valueOrRange)\n- [.from](https://github.com/moll/js-strange/blob/master/doc/API.md#RangeTree.from)(ranges)\n\n\nLicense\n-------\nstRange.js is released under a *Lesser GNU Affero General Public License*, which in summary means:\n\n- You **can** use this program for **no cost**.\n- You **can** use this program for **both personal and commercial reasons**.\n- You **do not have to share your own program's code** which uses this program.\n- You **have to share modifications** (e.g bug-fixes) you've made to this program.\n\nFor more convoluted language, see the `LICENSE` file.\n\n\nAbout\n-----\n**[Andri Möll](http://themoll.com)** typed this and the code.  \n[Monday Calendar](https://mondayapp.com) supported the engineering work.\n\nIf you find stRange.js needs improving, please don't hesitate to type to me now at [andri@dot.ee](mailto:andri@dot.ee) or [create an issue online](https://github.com/moll/js-strange/issues).\n","maintainers":[{"name":"moll","email":"andri@dot.ee"}],"time":{"modified":"2022-06-27T00:40:39.936Z","created":"2013-10-09T11:59:22.202Z","0.1.337":"2013-10-09T11:59:25.509Z","1.0.0":"2015-05-11T19:40:17.413Z","1.1.0":"2015-06-29T12:42:21.340Z","1.2.0":"2015-07-03T23:48:41.176Z","1.3.0":"2015-07-17T13:44:26.836Z","1.4.0":"2016-07-08T07:18:50.373Z","1.5.0":"2016-07-12T07:25:04.777Z","1.6.0":"2016-08-05T18:23:03.067Z","1.7.0":"2016-08-05T18:41:11.486Z","1.7.1":"2017-01-15T18:33:58.204Z","1.7.2":"2017-02-22T09:17:32.339Z"},"author":{"name":"Andri Möll","email":"andri@dot.ee","url":"http://themoll.com"},"repository":{"type":"git","url":"git://github.com/moll/js-strange.git"},"users":{"moll":true},"homepage":"https://github.com/moll/js-strange","keywords":["range","ranges","interval","interval-tree","bst","integer","integers","sort","bounds","math"],"bugs":{"url":"https://github.com/moll/js-strange/issues"},"readmeFilename":"README.md"}