PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/node_modules/mongoose/lib/document_provider.js

https://bitbucket.org/coleman333/smartsite
JavaScript | 30 lines | 13 code | 5 blank | 12 comment | 1 complexity | ca16e1ffdec95b9309d555ec0f6d5558 MD5 | raw file
 1'use strict';
 2
 3/* eslint-env browser */
 4
 5/*!
 6 * Module dependencies.
 7 */
 8var Document = require('./document.js');
 9var BrowserDocument = require('./browserDocument.js');
10
11var isBrowser = false;
12
13/**
14 * Returns the Document constructor for the current context
15 *
16 * @api private
17 */
18module.exports = function() {
19  if (isBrowser) {
20    return BrowserDocument;
21  }
22  return Document;
23};
24
25/*!
26 * ignore
27 */
28module.exports.setBrowser = function(flag) {
29  isBrowser = flag;
30};