FGRibreau / FGRibreau/array-split-by
Open to a third argument to keep the elements to split at?
未关闭
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 2
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
描述
Sometimes you want to keep the element that causes the split (i.e., that the iteratee evaluates to true), i.e.,
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?
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 splitBy 入口开始,检查 iteratee 当前如何确定边界。实现并验证 issue 中所示的第三个参数行为,确保匹配的分隔符保留在下一个块的开头。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100