Range object. Will supports proper exclusive and infinite ranges in the future!
![NPM version][npm-badge] [npm-badge]: https://badge.fury.io/js/strange.png
Note: stRange.js will follow the semantic versioning starting from v1.0.0.
npm install strange
stRange.js doesn't yet have a build ready for the browser, but you might be able to use [Browserify][browserify] to have it run there till then.
Create a Range object by passing in a beginning and end:
var Range = require"strange"var range = 1 5
Check if something is a range and use it:
var Range = require"strange"if range instanceof Range console.lograngebegin rangeend
stRange.js is released under a Lesser GNU Affero General Public License, which in summary means:
- You can use this program for no cost.
- You can use this program for both personal and commercial reasons.
- You do not have to share your own program's code which uses this program.
- You have to share modifications (e.g bug-fixes) you've made to this program.
For more convoluted language, see the