mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-30 12:05:39 -05:00
16 lines
422 B
JavaScript
16 lines
422 B
JavaScript
import { Observable } from 'rx';
|
|
|
|
module.exports = function(Popularity) {
|
|
Popularity.on('dataSourceAttached', () => {
|
|
Popularity.findOne$ = Observable.fromNodeCallback(
|
|
Popularity.findOne,
|
|
Popularity
|
|
);
|
|
Popularity.findById$ = Observable.fromNodeCallback(
|
|
Popularity.findById,
|
|
Popularity
|
|
);
|
|
Popularity.find$ = Observable.fromNodeCallback(Popularity.find, Popularity);
|
|
});
|
|
};
|