Snippet format update
To match the starter (for the migration)
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
### bifurcateBy
|
||||
---
|
||||
title: bifurcateBy
|
||||
tags: array,function,intermediate
|
||||
---
|
||||
|
||||
Splits values into two groups according to a predicate function, which specifies which group an element in the input collection belongs to. If the predicate function returns a truthy value, the collection element belongs to the first group; otherwise, it belongs to the second group.
|
||||
|
||||
@ -11,4 +14,4 @@ const bifurcateBy = (arr, fn) =>
|
||||
|
||||
```js
|
||||
bifurcateBy(['beep', 'boop', 'foo', 'bar'], x => x[0] === 'b'); // [ ['beep', 'boop', 'bar'], ['foo'] ]
|
||||
```
|
||||
```
|
||||
Reference in New Issue
Block a user