UNPKG
mauss
Version:
latest (0.10.7)
0.10.7
0.10.6
0.10.5
0.10.4
0.10.3
0.10.2
0.10.1
0.10.0
0.9.2
0.9.1
0.9.0
0.8.3
0.8.2
0.8.1
0.8.0
0.7.2
0.7.1
0.7.0
0.6.0
0.5.0
0.4.12
0.4.11
0.4.10
0.4.9
0.4.8
0.4.7
0.4.6
0.4.5
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.3
0.3.2
0.3.1
0.3.0
0.2.3
0.2.2
0.2.1
0.2.0
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.11
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
practical functions and reusable configurations
github.com/alkamauss/mauss
alkamauss/mauss
mauss
/
src
/
core
/
array
/
group.js
9 lines
(8 loc)
•
199 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
export
function
partition
(
array
, predicate
)
{
const
inc
= [];
const
exc
= [];
for
(
const
item
of
array
) { (
predicate
(item) ? inc : exc).
push
(item); }
return
[inc, exc]; }