Refactoring

This commit is contained in:
syuilo
2019-01-24 09:34:03 +09:00
parent 4b13c6deae
commit 971d78a957
5 changed files with 21 additions and 26 deletions

View File

@ -1,13 +0,0 @@
import * as loki from 'lokijs';
export default function(db: loki, name: string, opts?: any): loki.Collection {
let collection;
collection = db.getCollection(name);
if (collection == null) {
collection = db.addCollection(name, opts);
}
return collection;
}