alex at weej.com
Wed Jun 15 01:47:22 UTC 2016
There is a precedent here from set theory.
is really the equivalent of:
A is a superset of B
or otherwise put:
B - A = empty set
Hence, if B is the empty set, then it is indeed true for all sets A.
On Tuesday, 14 June 2016, Shahar Or <mightyiampresence at gmail.com> wrote:
> What's the point of using `reduce` instead of `every`?
> Of course. Updated to use `.every`.
> I disagree with this test
>> expect([2, 3].includesAll()).toBe(false)
>> The array `[2,3]` includes all items in ``. So it should return `true`.
> There are no items in `` so that doesn't seem like a true statement to
> However, one could argue both ways. So I look at `.includes`:
> .includes() // false
> includes() // false
> // and so on...
> So, at least consistency pulls towards `false`.
> > It'd be nicer if it took an array, rather than being variadic. That also
> preserves the ability to add extra arguments in the future.
> I see the point. Updated to use a single array argument.
> Here it is: http://codepen.io/mightyiam/pen/PzNLKr/?editors=0012
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss