Not your usual array to string
npm i -S trend-array-to-string
import arrayToString from 'trend-array-to-string';
const array = [1, 3, 4, 5, 6, 7, 8];
const fancyString = arrayToString(array);
console.log(fancyString); // 1,3-8
var arrayToString = require('trend-array-to-string').default;
var array = [1, 3, 4, 5, 6, 7, 8];
var fancyString = arrayToString(array);
console.log(fancyString); // 1,3-8
npm i
npm test