blob: 9b9b80b4c3dc554dbd506c2c203b18ff7fd55b25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
var assert = require('assert')
var env = require('../').env;
console.log('environment: %s', env.type);
var col;
switch (env.type) {
case 'node':
col = require('./collection/node');
break;
case 'mongo':
col = require('./collection/mongo');
case 'browser':
col = require('./collection/browser');
default:
throw new Error('missing collection implementation for environment: ' + env.type);
}
module.exports = exports = col;
|