arnaucube
arnaucube/thoughtsPublic Self-hosted repository
thoughts/node_modules/mongoose/lib/document_provider.js
node_modules/mongoose/lib/document_provider.jsRaw
 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
11/**
12 * Returns the Document constructor for the current context
13 *
14 * @api private
15 */
16module.exports = function() {
17  if (typeof window !== 'undefined' && typeof document !== 'undefined' && document === window.document) {
18    return BrowserDocument;
19  }
20  return Document;
21};