Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Automattic/mongoose
/ functions
Functions
1,018 in github.com/Automattic/mongoose
⨍
Functions
1,018
◇
Types & classes
646
Method
hello
()
test/schema.test.js:2734
Method
hello
()
test/schema.test.js:2740
Function
helloPlugin
(schema)
test/index.test.js:452
Function
id
* Searches array items for the first document with a matching _id. * * #### Example: * * const embeddedDoc = m.array.id(some_id); *
lib/types/DocumentArray/methods/index.js:112
Function
idSetter
* * @param {String} v the id to set * @api private
lib/helpers/schema/idGetter.js:43
Function
includes
* Return whether or not the `obj` is included in the array. * * @param {Object} obj the item to check * @param {Number} fromIndex * @retur
lib/types/array/methods/index.js:489
Function
increment
()
lib/model.js:943
Function
index
()
test/types/schemaTypeOptions.test.ts:35
Function
indexOf
* Return the index of `obj` or `-1` if not found. * * @param {Object} obj the item to look for * @param {Number} fromIndex * @return {Numb
lib/types/array/methods/index.js:505
Function
inheritance
()
test/types/models.test.ts:237
Function
insertManyTest
()
test/types/models.test.ts:66
Function
inspect
* Helper for console.log * * @method inspect * @api public * @memberOf MongooseDocumentArray
lib/types/DocumentArray/methods/index.js:249
Method
inspect
* inspect helper * @api private
lib/error/setOptionError.js:35
Function
instanceFn
()
test/document.test.js:13182
Function
instanceFn
()
test/types/schema.test.ts:530
Function
isRequired
()
test/schema.validation.test.js:280
Function
iter
(mem)
lib/model.js:679
Function
last
(v)
test/schema.test.js:560
Function
lowercase
(v)
test/schema.test.js:503
Function
map
(o)
lib/drivers/node-mongodb-native/collection.js:358
Function
maps
()
test/types/schema.test.ts:1130
Function
matchValidator
(v)
lib/schema/string.js:534
Function
middleware
(next)
test/model.discriminator.test.js:375
Function
modelRemoveOptions
()
test/types/models.test.ts:514
Function
myName
()
test/types/schema.test.ts:876
Function
myPlugin
(schema)
test/model.discriminator.test.js:2027
Function
myValidator
()
test/schema.validation.test.js:921
Function
nonAtomicPush
* Pushes items to the array non-atomically. * * #### Note: * * _marks the entire array as modified, which if saved, will store it as a `$s
lib/types/array/methods/index.js:545
Function
notify
(event)
lib/types/DocumentArray/methods/index.js:289
Function
obfuscate
(email)
test/docs/getters-setters.test.js:34
Method
openUri
()
test/driver.test.js:66
Function
overwriteBulkWriteContents
()
test/types/models.test.ts:335
Function
pluginFunction
(schema: Schema<any>, options: SomePluginOptions)
test/types/schema.test.ts:758
Function
pluginFunction2
(schema: Schema<any>)
test/types/schema.test.ts:776
Function
pluginGeneric
(schema: Schema)
test/types/plugin.test.ts:62
Function
pluginMethods
(schema: Schema<Test, any, TestInstanceMethods>)
test/types/plugin.test.ts:18
Function
pluginOptions
()
test/types/schema.test.ts:752
Function
pluginQueryHelpers
(schema: Schema<Test, any, any, TestQueryHelpers>)
test/types/plugin.test.ts:12
Function
pluginStatics
(schema: Schema<Test, TestModel, any, TestQueryHelpers, any, TestStaticMethods>)
test/types/plugin.test.ts:24
Function
pluginVirtuals
(schema: Schema<Test, any, any, any, TestVirtuals>)
test/types/plugin.test.ts:3
Function
pop
* Wraps [`Array#pop`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/pop) with proper change tracking. * * #### Note
lib/types/array/methods/index.js:566
Function
preMiddlewareFn
(next, opts)
test/types/middleware.test.ts:4
Function
preMiddlewareFn
(next, opts)
test/types/middleware.preposttypes.test.ts:8
Function
preValidate
(next)
test/model.discriminator.test.js:563
Function
pull
* Pulls items from the array atomically. * * @param {...Object} [args] * @api public * @method pull * @memberOf MongooseDocumentArray
lib/types/DocumentArray/methods/index.js:207
Function
pull
* Pulls items from the array atomically. Equality is determined by casting * the provided value to an embedded document and comparing using * [t
lib/types/array/methods/index.js:604
Function
push
* Wraps [`Array#push`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/push) with proper change tracking. * * @param
lib/types/DocumentArray/methods/index.js:190
Function
push
* Wraps [`Array#push`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/push) with proper change tracking. * * #### Ex
lib/types/array/methods/index.js:678
Function
rawDocSyntax
()
test/types/models.test.ts:24
Function
registerPlugin
()
test/types/plugin.test.ts:76
Function
remove
* Alias of [pull](https://mongoosejs.com/docs/api/array.html#MongooseArray.prototype.pull()) * * @see MongooseArray#pull https://mongoosejs.com/
lib/types/array/methods/index.js:738
Function
removeSufix
(name)
test/document.test.js:12477
Function
required
()
test/model.validate.test.js:136
Function
resetId
(v)
lib/schema/objectid.js:281
Function
schemaInstanceMethodsAndQueryHelpers
()
test/types/models.test.ts:444
Function
schemaInstanceMethodsAndQueryHelpersOnConnection
()
test/types/connection.test.ts:102
Function
set
(i, val, skipModified)
lib/types/DocumentArray/methods/index.js:317
Function
set
* Sets the casted `val` at index `i` and marks the array modified. * * #### Example: * * // given documents based on the following
lib/types/array/methods/index.js:769
Function
set
(v)
test/schema.test.js:3023
Function
set
(v)
test/types.map.test.js:621
Function
set
(v)
test/document.test.js:7066
Function
set
()
test/types/virtuals.test.ts:107
Function
set
(v)
test/docs/virtuals.test.js:187
Function
setAsObject
()
test/types/base.test.ts:55
Function
setLat
(val)
test/model.test.js:1479
Function
shift
* Wraps [`Array#shift`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/unshift) with proper change tracking. * @api pri
lib/types/DocumentArray/methods/index.js:220
Function
shift
* Wraps [`Array#shift`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/unshift) with proper change tracking. * * ###
lib/types/array/methods/index.js:800
Function
sort
* Wraps [`Array#sort`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/sort) with proper change tracking. * * #### No
lib/types/array/methods/index.js:821
Function
splice
* Wraps [`Array#splice`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/splice) with proper change tracking and casting.
lib/types/DocumentArray/methods/index.js:233
Function
splice
* Wraps [`Array#splice`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/splice) with proper change tracking and casting.
lib/types/array/methods/index.js:841
Function
staticFn
()
test/model.test.js:7416
Function
staticFn
()
test/types/schema.test.ts:524
Function
storeShard
()
lib/plugins/sharding.js:57
Function
success
(doc)
test/model.populate.test.js:1932
Function
tAndDocSyntax
()
test/types/models.test.ts:49
Function
test
()
test/types/discriminator.test.ts:27
Function
test
(dbModel: Model<DocT>)
test/types/models.test.ts:652
Function
testGenericQuery
()
test/types/queries.test.ts:173
Function
testInferTimestamps
()
test/types/schema.test.ts:860
Function
testMethods
()
test/types/document.test.ts:70
Function
testMiddleware
()
test/schema.test.js:2162
Function
testPathsParam
()
test/types/populate.test.ts:95
Function
testRequiredId
()
test/types/document.test.ts:92
Function
toBSON
()
lib/types/DocumentArray/methods/index.js:21
Function
toBSON
()
lib/types/array/methods/index.js:872
Function
toBSON
()
test/helpers/clone.test.js:301
Function
toJSON
()
test/helpers/clone.test.js:201
Method
toJSON
* Converts this map to a native JavaScript Map for `JSON.stringify()`. Set * the `flattenMaps` option to convert this map to a POJO instead. *
lib/types/map.js:245
Method
toJSON
* Ensure `name` and `message` show up in toJSON output re: gh-9296 * @api private
lib/error/validator.js:49
Function
toLower
(email)
test/docs/getters-setters.test.js:146
Function
toObject
* Returns a native js Array of plain js objects * * #### Note: * * _Each sub-document is converted to a plain object by calling its `#toOb
lib/types/DocumentArray/methods/index.js:163
Function
toObject
()
test/helpers/clone.test.js:57
Function
toString
()
test/helpers/clone.test.js:190
Method
toString
* Console.log helper
lib/error/validation.js:41
Method
toString
* Console.log helper
lib/error/setOptionError.js:27
Function
toUUID
(string)
test/model.findOneAndUpdate.test.js:1624
Function
transform
(doc, id)
test/model.populate.test.js:9399
Function
unshift
* Wraps [`Array#unshift`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/unshift) with proper change tracking. * * #
lib/types/array/methods/index.js:918
Function
uptick
()
test/model.test.js:1485
Function
valid
(v)
test/types.buffer.test.js:15
← previous
next →
901–1,000 of 1,018, ranked by callers