FGRibreau / FGRibreau/array-split-by
Open to a third argument to keep the elements to split at?
Abierto
- Lenguaje dominante
- JavaScript
- Estrellas
- 2
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Sometimes you want to keep the element that causes the split (i.e., that the iteratee evaluates to true), i.e.,
```js
splitBy([1, 2, 3, "|", 4, 5, 6], val => val === "|", true); // [[1, 2, 3], ["|", 4, 5, 6]]
// ^^^^ NEW ^^^ NEW
```
Would you be open to accepting a pull request that implements this? The third argument could be called `keepSeparator` or something?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.