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

Function handleArray

lib/schema/string.js:623–631  ·  view source on GitHub ↗
(val, context)

Source from the content-addressed store, hash-verified

621 */
622
623function handleArray(val, context) {
624 const _this = this;
625 if (!Array.isArray(val)) {
626 return [this.castForQuery(null, val, context)];
627 }
628 return val.map(function(m) {
629 return _this.castForQuery(null, m, context);
630 });
631}
632
633/*!
634 * ignore

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected