mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-19 16:12:14 +11:00
32 lines
412 B
JavaScript
32 lines
412 B
JavaScript
'use strict';
|
|
|
|
let collection;
|
|
let cursor;
|
|
let db;
|
|
|
|
function loadCollection() {
|
|
if (!collection) {
|
|
collection = require('./collection');
|
|
}
|
|
return collection;
|
|
}
|
|
|
|
function loadCursor() {
|
|
if (!cursor) {
|
|
cursor = require('./cursor');
|
|
}
|
|
return cursor;
|
|
}
|
|
|
|
function loadDb() {
|
|
if (!db) {
|
|
db = require('./db');
|
|
}
|
|
return db;
|
|
}
|
|
|
|
module.exports = {
|
|
loadCollection,
|
|
loadCursor,
|
|
loadDb
|
|
};
|