{"size": 403, "ext": "js", "max_stars_repo_path": "lib/inmemory/store.js", "max_stars_repo_name": "surikaterna/viewdb", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/inmemory/store.js", "max_issues_repo_name": "surikaterna/viewdb", "max_issues_repo_issues_event_min_datetime": "2019-12-27T21:12:53.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-08T01:04:35.000Z", "max_forks_repo_path": "lib/inmemory/store.js", "max_forks_repo_name": "surikaterna/viewdb", "max_forks_repo_forks_event_min_datetime": "2016-11-23T07:59:23.000Z", "max_forks_repo_forks_event_max_datetime": "2016-11-23T07:59:23.000Z"}
{"max_stars_count": null, "max_issues_count": 6, "max_forks_count": 1, "avg_line_length": 20.15, "max_line_length": 65, "alphanum_fraction": 0.7022332506}
var Collection = require('./collection');

var Store = function() {
	this._collections = {};
};

Store.prototype.collection = function(collectionName, callback) {
	var coll = this._collections[collectionName];
	if(coll === undefined) {
		coll = new Collection(collectionName);
		this._collections[collectionName] = coll;
	}
	if(callback) {
		callback(coll);
	}
	return coll;
};

module.exports = Store;
