mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
Latest Code
This commit is contained in:
22
node_modules/strong-store-cluster/lib/collection.js
generated
vendored
Normal file
22
node_modules/strong-store-cluster/lib/collection.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
module.exports = collection;
|
||||
|
||||
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
var cluster = require('cluster');
|
||||
|
||||
if (cluster.isMaster)
|
||||
var Collection = require('./master/Collection.js');
|
||||
else
|
||||
var Collection = require('./worker/Collection.js');
|
||||
|
||||
|
||||
var collections = {};
|
||||
|
||||
function collection(name) {
|
||||
if (!hasOwnProperty.call(collections, name))
|
||||
return collections[name] = new Collection(name);
|
||||
else
|
||||
return collections[name];
|
||||
}
|
Reference in New Issue
Block a user