deranged
v1.1.1
Published
Parse / stringify discontinuous integer ranges
Downloads
13
Readme
Example
import deranged from 'deranged';
deranged.parse('2005..2008,2010,2015..2018')
// => [2005, 2006, 2007, 2008, 2010, 2015, 2016, 2017, 2018]
deranged.stringify([2005, 2006, 2007, 2008, 2010, 2015, 2016, 2017, 2018])
// => '2005..2008,2010,2015..2018'