mongodb

Namespace

mongodb

Description:
  • MongoDB integration
Source:

Classes

MongoDBModule

Methods

(static) exports.convertObjectIds(o)

Description:
  • Checks an input object for any strings which pass the parse check and convert matches to ObjectId instances
Source:
Parameters:
Name Type Description
o Object Object to be checked

(static) exports.createObjectId() → {external:MongoDBObjectId}

Description:
  • Creates a new ObjectId instance
Source:
Returns:
Type
external:MongoDBObjectId

(static) exports.isObjectId(data) → {Boolean}

Description:
  • Checks if a value is a MongoDB ObjectId instance
Source:
Parameters:
Name Type Description
data * The value to check
Returns:
Type
Boolean

(static) exports.isValidObjectId(s) → {Boolean}

Description:
  • Checks a string is a valid ObjectId
Source:
Parameters:
Name Type Description
s String String to check
Returns:
Type
Boolean

(static) exports.parseObjectId(s) → {external:MongoDBObjectId}

Description:
  • Converts a string to an ObjectId
Source:
Parameters:
Name Type Description
s String The string to convert
Throws:
Error
Returns:
The converted ID
Type
external:MongoDBObjectId