PageRenderTime 20ms CodeModel.GetById 17ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/node_modules/mongoose/lib/connectionstate.js

https://bitbucket.org/coleman333/smartsite
JavaScript | 24 lines | 16 code | 5 blank | 3 comment | 0 complexity | 6947ff9834ef6a3bf4a989b2e1f53db6 MD5 | raw file
 1
 2/*!
 3 * Connection states
 4 */
 5
 6var STATES = module.exports = exports = Object.create(null);
 7
 8var disconnected = 'disconnected';
 9var connected = 'connected';
10var connecting = 'connecting';
11var disconnecting = 'disconnecting';
12var uninitialized = 'uninitialized';
13
14STATES[0] = disconnected;
15STATES[1] = connected;
16STATES[2] = connecting;
17STATES[3] = disconnecting;
18STATES[99] = uninitialized;
19
20STATES[disconnected] = 0;
21STATES[connected] = 1;
22STATES[connecting] = 2;
23STATES[disconnecting] = 3;
24STATES[uninitialized] = 99;