0.0.1 • Published 3 years ago

nums-from-array v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Convert array by type 1,3,4,5,6,7,8,10,11,12 -> "1,3-8,10-12"

For install package run following script in your terminal

$ npm i nums-from-array

Usage:

const converter = require('nums-from-array')

converter.convertArray([1,2,3,5,6,8,10,13]).then(res=>{
    console.log(res)//1-3,5,6,8,10
})
0.0.1

3 years ago