2.2.11 • Published 3 years ago

@extra-set/partition.min v2.2.11

Weekly downloads
187
License
MIT
Repository
github
Last release
3 years ago

Segregates values by test result. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

Alternatives: partition, partitionAs.

This is part of package extra-set.

This is browserified, minified version of @extra-set/partition. It is exported as global variable set_partition. CDN: unpkg, jsDelivr.

set.partition(x, ft);
// x:  a set
// ft: test function (v, v, x)
// → [satisfies, doesnt]
const set = require("extra-set");

var x = new Set([1, 2, 3, 4]);
set.partition(x, v => v % 2 == 0);
// [ Set(2) { 2, 4 }, Set(2) { 1, 3 } ]

var x = new Set([1, 2, 3, 4, 5]);
set.partition(x, v => v % 2 == 1);
// [ Set(3) { 1, 3, 5 }, Set(2) { 2, 4 } ]

References

2.2.11

3 years ago

2.2.7

3 years ago

2.2.10

3 years ago

2.2.9

3 years ago

2.2.8

3 years ago

2.2.5

3 years ago

2.2.4

4 years ago

2.2.3

4 years ago

2.2.2

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.63

4 years ago

2.1.61

4 years ago

2.1.62

4 years ago

2.1.60

4 years ago

2.1.58

4 years ago

2.1.59

4 years ago

2.1.56

4 years ago

2.1.57

4 years ago

2.1.55

4 years ago

2.1.54

4 years ago

2.1.52

4 years ago

2.1.53

4 years ago

2.1.49

4 years ago

2.1.47

4 years ago

2.1.48

4 years ago

2.1.50

4 years ago

2.1.51

4 years ago

2.1.45

4 years ago

2.1.46

4 years ago

2.1.44

4 years ago

2.1.43

4 years ago

2.1.42

4 years ago