MCPcopy Create free account
hub / github.com/codecombat/codecombat / mapper

Method mapper

app/models/User.js:515–515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513 const definedAttributes = _.pick(this._revertAttributes, v => v !== undefined)
514 const oldResult = tv4.validateMultiple(definedAttributes, this.constructor.schema || {})
515 const mapper = error => [error.code.toString(), error.dataPath, error.schemaPath].join(':')
516 const originalErrors = _.map(oldResult.errors, mapper)
517 const currentErrors = _.map(errors, mapper)
518 const newErrors = _.difference(currentErrors, originalErrors)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected