βββββββ βββββββ ββββββββ ββββββββ βββββββ βββ βββ βββ βββ
βββββββββ ββββββββ ββββββββ ββββββββ ββββββββ βββ βββ ββββββββ
βββ βββ ββββββββ ββββββββ ββββββ ββββββββ βββ βββ ββββββ
βββ βββ ββββββββ ββββββββ ββββββ ββββββββ ββββ ββββ ββββββ
βββββββββ ββββββββ ββββββββ ββββββββ βββ βββ βββββββ ββββ βββ
βββββββ βββββββ ββββββββ ββββββββ βββ βββ βββββ βββ βββ
ObservX β‘οΈ
Tini-Tiny Observer creating library. Not even sure it achievs that goal but surely does something π
Installation π
$Β npmΒ iΒ --saveΒ observx
Usage π
Β constΒ Β subscribeΒ Β =Β Β varΒ streamedDataΒ =Β ;console;Β //Β [12,Β 323,Β 233]streamedData;console;Β //Β [2]Β Β
API π
subscribe(data[,onchangeCB])
the subscribe
method takes one required argument which is the observables or the data and one optional callback which is called everytime any changes happens to the observer. It returns a observer
The callback onchangeCB
will give a response argument which is a object consisting the data and the type of the data
Β dataΒ newdataΒ typeOfData:Β typeofΒ dataΒ
subcribe().changeWith(newData)
this method takes a argument with which it will change the existing data. It will return the newdata which is replaced with
subcribe().currentData()
It will simply return the current data (observables).
## Note Still Need some refactoring and fixing for the APIs and the
subscribe
method π