forked from Automattic/mongoose
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobjectid.js
More file actions
43 lines (35 loc) · 681 Bytes
/
Copy pathobjectid.js
File metadata and controls
43 lines (35 loc) · 681 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*!
* Access driver.
*/
var driver = global.MONGOOSE_DRIVER_PATH || '../drivers/node-mongodb-native';
/**
* ObjectId type constructor
*
* ####Example
*
* var id = new mongoose.Types.ObjectId;
*
* @constructor ObjectId
*/
var ObjectId = require(driver + '/objectid');
module.exports = ObjectId;
/**
* Creates an ObjectId from `str`
*
* @param {ObjectId|HexString} str
* @static fromString
* @receiver ObjectId
* @return {ObjectId}
* @api private
*/
ObjectId.fromString;
/**
* Converts `oid` to a string.
*
* @param {ObjectId} oid ObjectId instance
* @static toString
* @receiver ObjectId
* @return {String}
* @api private
*/
ObjectId.toString;