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

Function handleArray

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected