API · Select
where()
Keep objects whose listed properties strictly equal the requested values.
Signature
where(properties: Partial<T>): Exstream<T, C> Example
const openItalian = exstream(orders).where({ country: 'IT', status: 'open' }) Parameters
propertiesAll enumerable string properties visited by
for…inmust match with===. Symbol properties are not checked; inherited enumerable matcher properties are.
Matching
Comparison is shallow. Objects and arrays match by identity, NaN never matches itself, and a missing property can match an explicitly requested undefined. An empty matcher keeps every successful value.
where() is a synchronous filter(): it preserves order and context, adds no queue, and propagates pressure. Existing record errors pass through without matching.
Errors
Reading a property from null or undefined, or from a throwing getter, becomes a filter() record error. Other primitives use normal JavaScript property access.
Forms
stream.where({ status: 'open' })
exstream.pipeline().where({ status: 'open' })
exstream.where({ status: 'open' }, stream)
stream.through(exstream.where({ status: 'open' }))