MCPcopy
hub / github.com/Automattic/mongoose / get

Method get

lib/types/map.js:55–65  ·  view source on GitHub ↗

* Overwrites native Map's `get()` function to support Mongoose getters. * * @api public * @method get * @memberOf Map

(key, options)

Source from the content-addressed store, hash-verified

53 */
54
55 get(key, options) {
56 if (isBsonType(key, 'ObjectId')) {
57 key = key.toString();
58 }
59
60 options = options || {};
61 if (options.getters === false) {
62 return super.get(key);
63 }
64 return this.$__schemaType.applyGetters(super.get(key), this.$__parent);
65 }
66
67 /**
68 * Overwrites native Map's `set()` function to support setters, `populate()`,

Callers 15

setMethod · 0.95
toObjectMethod · 0.95
toJSONMethod · 0.95
_insertManyFunction · 0.80
_bulkWriteFunction · 0.80
_populatePathFunction · 0.80
model.jsFile · 0.80
connection.jsFile · 0.80
_resetSessionDocumentsFunction · 0.80
SchemaFunction · 0.80
aliasFieldsFunction · 0.80
schema.jsFile · 0.80

Calls 2

isBsonTypeFunction · 0.85
toStringMethod · 0.45

Tested by 13

decryptFunction · 0.64
helloPluginFunction · 0.64
fnFunction · 0.64
createWithMapOfSubdocsFunction · 0.64
gh15111Function · 0.64
gh15122Function · 0.64
pluginVirtualsFunction · 0.64
mapsFunction · 0.64
mapsFunction · 0.64
validatorFunction · 0.64
gh15516Function · 0.64
gh13738Function · 0.64