https://github.com/ericadamski/rx-trace
📝 A simple trace operator to help with debugging Rx streams
https://github.com/ericadamski/rx-trace
operators rxjs rxjs-observables rxjs6
Last synced: about 1 month ago
JSON representation
📝 A simple trace operator to help with debugging Rx streams
- Host: GitHub
- URL: https://github.com/ericadamski/rx-trace
- Owner: ericadamski
- Created: 2018-07-27T14:27:33.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-27T15:14:11.000Z (almost 8 years ago)
- Last Synced: 2026-05-12T09:37:29.483Z (about 2 months ago)
- Topics: operators, rxjs, rxjs-observables, rxjs6
- Language: TypeScript
- Size: 38.1 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rx-Trace
📝 A simple trace operator to help with debugging Rx streams
## API
```javascript
function trace( label: string, log: Function = console.log ): (source$: Observable) => Observable;
```
## Example
```javascript
import { from } from 'rxjs';
import { map, filter } from 'rxjs/operators';
import trace from 'rxtrace';
from([1, 2, 3])
.pipe(
map(i => i * 2),
trace('multiply'),
filter(i => i % 3 !== 0),
trace('not divisible by three')
)
.subscribe({
next(i) {
console.log(`result ${i}`);
},
});
```