This package has been deprecated

Author message:

not needed anymore

rxify-class

1.0.8 • Public • Published

rxify-class

NPM version Linux macOS Windows compatible

Build status Coverage status Dependency status Renovate enabled

Open in Gitpod

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:

MIT License

Readme

Keywords

Package Sidebar

Install

npm i rxify-class

Weekly Downloads

0

Version

1.0.8

License

MIT

Unpacked Size

5.05 kB

Total Files

5

Last publish

Collaborators

  • dword-design