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

Function handleArray

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

Source from the content-addressed store, hash-verified

629 */
630
631function handleArray(val, context) {
632 const _this = this;
633 if (!Array.isArray(val)) {
634 return [this.castForQuery(null, val, context)];
635 }
636 return val.map(function(m) {
637 return _this.castForQuery(null, m, context);
638 });
639}
640
641/*!
642 * ignore

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected