You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Sven Slootweg 4aeef9faeb Initial version 3 months ago
README.md Initial version 3 months ago
index.js Initial version 3 months ago
package.json Initial version 3 months ago

README.md

@promistream/no-value

This module exports a symbol for representing a "no value" situation; it is used by various Promistream modules for cases where a callback provided to a stream may not always produce a value.

Importantly, this symbol is not a part of the Promistreams specification; it is a convenience for stream modules that allow specifying a custom callback (eg. map) and that need some way to represent an absence of a value, where a null or undefined would be too ambiguous (eg. because it would be a valid value). You should only use this symbol when a stream tells you that it supports it.

Why this is a stand-alone package

This ensures that there is only ever one symbol in use for this purpose, regardless of how many different stream modules you are using, and at what versions. This package will likely never receive an update, and it internally has a mechanism to ensure that only one global symbol is ever used across the application; if you somehow have multiple versions of this package loaded, all of them will export an identical symbol.