
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
falcor-observable
Advanced tools
An Observable implementation compatible with the Falcor DataSource API. Avoids try/catch.
An Observable implementation compatible with the Falcor DataSource API.
Unless you are implementing a Falcor DataSource you will likely be better served by the more fully featured RxJS.
The error handling policy of the Observable is configurable to allow for easier core dump debugging.
By default, errors thrown by the subscriber function are caught as they are in the Promise API. Errors calling the observer's notification callbacks are swallowed by default.
To disable all try/catch usage in falcor-observable, call set the environment
variable FALCOR_OBSERVABLE_NO_CATCH
to a non empty value before this package
is first imported.
This package is interoperable with RxJS and other Observable implementations
following the symbol-observable protocol. Use Observable.from(other)
to
convert between implementations:
const Rx = require("rxjs/Rx");
const falcorObservable = require("falcor-observable").Observable;
// Take any compliant observable.
const obs = Rx.Observable.of(1, 2, 3);
// Convert to falcor-observable.
const fobs = falcorObservable.from(obs);
fobs.subscribe({
onNext(value) {
console.log("onNext", value);
}
});
// Convert to RxJS.
const rxobs = Rx.Observable.from(fobs);
rxobs.subscribe({
next(value) {
console.log("next", value);
}
});
The pipe
instance method can be used to apply operators to an Observable.
const { Observable, map } = require("falcor-observable");
Observable.of(1,2,3)
.pipe(
map(x => x + 1),
map(x => x + 1))
.subscribe({
onNext(value) {
console.log("onNext", value);
}
});
FAQs
An Observable implementation compatible with the Falcor DataSource API. Avoids try/catch.
The npm package falcor-observable receives a total of 52 weekly downloads. As such, falcor-observable popularity was classified as not popular.
We found that falcor-observable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.