rx-fn-observe
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

rx-fn-observe

Observe any object's method calls

NPM Version

Install

npm i -S rx-fn-observe

API

The API provides two functions to observe calls to methods. Both expect an object and the name of the function to observe.

observeArguments<T, K extends keyof T>(object: T, method: K): Observable<ArgumentList<T[K]>>

Emits the argument list passed to the method before the function body executes.

observeReturnValue<T, K extends keyof T>(object: T, method: K): Observable<ReturnType<T[K]>>

Emits the return value of the method after the function body has been executed.

License

ISC

Package Sidebar

Install

npm i rx-fn-observe

Weekly Downloads

2

Version

0.0.2

License

ISC

Unpacked Size

13.7 kB

Total Files

29

Last publish

Collaborators

  • tao-cumplido