arnaucube
arnaucube/thoughtsPublic Self-hosted repository
thoughts/node_modules/mongoose/lib/browser.js
node_modules/mongoose/lib/browser.jsRaw
 1/* eslint-env browser */
 2
 3/**
 4 * The [MongooseError](#error_MongooseError) constructor.
 5 *
 6 * @method Error
 7 * @api public
 8 */
 9
10exports.Error = require('./error');
11
12/**
13 * The Mongoose [Schema](#schema_Schema) constructor
14 *
15 * ####Example:
16 *
17 *     var mongoose = require('mongoose');
18 *     var Schema = mongoose.Schema;
19 *     var CatSchema = new Schema(..);
20 *
21 * @method Schema
22 * @api public
23 */
24
25exports.Schema = require('./schema');
26
27/**
28 * The various Mongoose Types.
29 *
30 * ####Example:
31 *
32 *     var mongoose = require('mongoose');
33 *     var array = mongoose.Types.Array;
34 *
35 * ####Types:
36 *
37 * - [ObjectId](#types-objectid-js)
38 * - [Buffer](#types-buffer-js)
39 * - [SubDocument](#types-embedded-js)
40 * - [Array](#types-array-js)
41 * - [DocumentArray](#types-documentarray-js)
42 *
43 * Using this exposed access to the `ObjectId` type, we can construct ids on demand.
44 *
45 *     var ObjectId = mongoose.Types.ObjectId;
46 *     var id1 = new ObjectId;
47 *
48 * @property Types
49 * @api public
50 */
51exports.Types = require('./types');
52
53/**
54 * The Mongoose [VirtualType](#virtualtype_VirtualType) constructor
55 *
56 * @method VirtualType
57 * @api public
58 */
59exports.VirtualType = require('./virtualtype');
60
61/**
62 * The various Mongoose SchemaTypes.
63 *
64 * ####Note:
65 *
66 * _Alias of mongoose.Schema.Types for backwards compatibility._
67 *
68 * @property SchemaTypes
69 * @see Schema.SchemaTypes #schema_Schema.Types
70 * @api public
71 */
72
73exports.SchemaType = require('./schematype.js');
74
75/**
76 * Internal utils
77 *
78 * @property utils
79 * @api private
80 */
81
82exports.utils = require('./utils.js');
83
84/**
85 * The Mongoose browser [Document](#document-js) constructor.
86 *
87 * @method Document
88 * @api public
89 */
90exports.Document = require('./document_provider.js')();
91
92/*!
93 * Module exports.
94 */
95
96if (typeof window !== 'undefined') {
97  window.mongoose = module.exports;
98  window.Buffer = Buffer;
99}