1.0.1 • Published 2 years ago

rangelist-quq99 v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

RangeList

npm version Coverage Status Build Status

Installation

npm

npm i rangelist-quq99

unpkg

<script src="https://unpkg.com/rangelist-quq99@1.0.0/dist/bundle.umd.js"></script>

Usage

import { RangeList } from 'rangelist-quq99'

example

// Example run
const rl = new RangeList()
rl.add([1, 5])
rl.print()
// Should display: [1, 5)
rl.add([10, 20])
rl.print()
// Should display: [1, 5) [10, 20)
rl.add([20, 20])
rl.print()
// Should display: [1, 5) [10, 20)
rl.add([20, 21])
rl.print()
// Should display: [1, 5) [10, 21)
rl.add([2, 4])
rl.print()
// Should display: [1, 5) [10, 21)
rl.add([3, 8])
rl.print()
// Should display: [1, 8) [10, 21)
rl.remove([10, 10])
rl.print()
// Should display: [1, 8) [10, 21)
rl.remove([10, 11])
rl.print()
// Should display: [1, 8) [11, 21)
rl.remove([15, 17])
rl.print()
// Should display: [1, 8) [11, 15) [17, 21)
rl.remove([3, 19])
rl.print()
// Should display: [1, 3) [19, 21)

Credit

Thanks react-css-spinners and videos

1.0.1

2 years ago

1.0.0

2 years ago