Files
biomedjs/node_modules/mongoose/lib/document_provider.js

20 lines
433 B
JavaScript
Raw Permalink Normal View History

2015-11-24 22:08:58 -08:00
'use strict';
/*!
* Module dependencies.
*/
var Document = require('./document.js');
var BrowserDocument = require('./browserDocument.js');
/**
* Returns the Document constructor for the current context
*
* @api private
*/
module.exports = function() {
if (typeof window !== 'undefined' && typeof document !== 'undefined' && document === window.document) {
return BrowserDocument;
} else {
return Document;
}
};