esamattis / esamattis/underscore.string

Add ranged number formatting

Open
#244 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.4k
Forks
367
PR merge metrics
No merged PRs in 30d

Description

Add a string function to collapse an array of numbers into a string.
Perhaps like this?

```
_.range(array, [ rangeSeparator='-', breakSeparator=','])

_.range([1,2,3,5,6,7,9])
=> "1-3,5-7,9"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.