Skip to content

Commit

Permalink
Fix runkit exapmle (former tonic)
Browse files Browse the repository at this point in the history
  • Loading branch information
smikitky committed Jul 15, 2017
1 parent f2eb0e4 commit c1193c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const { MultiRange, multirange } = require('multi-integer-range');

// Just a nice shorthand for you
const mr = value => multirange(value, { parseUnbounded: true, parseNegative: true });

// Basic manipulation
const range = mr('1-5, 9, 8').append(10).subtract(1);
console.log(range.toString());

// Iterator & array spread
console.log([...mr('(-103)-(-100), 101-103')]);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
"mocha-lcov-reporter": "^1.2.0",
"typescript": "~2.4.1"
},
"tonicExample": "import MultiRange, { multirange } from 'multi-integer-range';"
"runkitExampleFilename": "example.js"
}

0 comments on commit c1193c9

Please sign in to comment.