2.2.5 • Published 5 years ago

@extra-object/intersection-update v2.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Gives entries present in both objects. :running: :package: :ledger:

Similar: union, intersection, difference, symmetricDifference, isDisjoint. This is part of package extra-object.

object.intersection$(x, y, [fc]);
// x:  an object (updated)
// y:  another object
// fc: combine function (a, b)
// --> x
const object = require('extra-object');

var x = {a: 1, b: 2, c: 3, d: 4};
var y = {b: 20, c: 30, e: 50};
object.intersection$(x, y);
// { b: 2, c: 3 }

x;
// { b: 2, c: 3 }

var x = {a: 1, b: 2, c: 3, d: 4};
object.intersection$(x, y, (a, b) => b);
// { b: 20, c: 30 }

references

2.2.5

5 years ago

2.2.4

5 years ago

2.2.3

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.2.2

5 years ago

2.1.23

5 years ago

2.1.21

5 years ago

2.1.22

5 years ago

2.1.20

5 years ago

2.1.19

5 years ago

2.1.18

5 years ago

2.1.17

5 years ago