Task: Implement a 'Range Collection' class.

A pair of integers define a range, for example: [1, 5). This range includes integers: 1, 2, 3, and 4. A range collection is an aggregate of these ranges: [1, 5), [10, 11), [100, 201)

ES2015(Babel6) + ESLint(airbnb rules) + Mocha:

How to Run

At the project folder

  • setup project by running npm install
  • run the test by running npm test

Source

Implemention code see ./common/range-collection.js

Test code see ./test/common/range-collection-test.js