MCPcopy Create free account
hub / github.com/Automattic/mongoose / applyQueue

Function applyQueue

lib/document.js:3940–3951  ·  view source on GitHub ↗
(doc)

Source from the content-addressed store, hash-verified

3938 */
3939
3940function applyQueue(doc) {
3941 const q = doc.$__schema && doc.$__schema.callQueue;
3942 if (!q.length) {
3943 return;
3944 }
3945
3946 for (const pair of q) {
3947 if (pair[0] !== 'pre' && pair[0] !== 'post' && pair[0] !== 'on') {
3948 doc[pair[0]].apply(doc, pair[1]);
3949 }
3950 }
3951}
3952
3953/*!
3954 * ignore

Callers 1

DocumentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected