Licence
MIT
Version
1.0.8
Deps
1
Size
5 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated
rxify-class
Decorates an existing class with methods supporting Rxjs. No more ugly callback functions :). In contrast to other modules you can wrap a whole class in one go, specifying the methods you want to decorate.
Install
# NPM
$ npm install rxify-class
# Yarn
$ yarn add rxify-class
Usage
Example with in-memory MongoDB:
const rxifyClass = require('rxify-class');
const MongoInMemory = rxifyClass(
require('mongo-in-memory'),
['start', 'getConnection']
);
var mongoInMemory = new MongoInMemory(8000);
mongoInMemory.start().subscribe(config => {
mongoInMemory.getConnection('test').subscribe(client => {
...
});
});
License
Unless stated otherwise all works are:
Copyright Sebastian Landwehr info@dword-design.de
and licensed under: