MCPcopy Create free account
hub / github.com/cryptii/cryptii / filterValue

Method filterValue

src/Field.js:284–290  ·  view source on GitHub ↗

* Filters given raw value. Called whenever a value gets set * using Field.setValue. Override is required to call super. * @override * @param {mixed} rawValue Value to be filtered * @return {mixed} Filtered value

(rawValue)

Source from the content-addressed store, hash-verified

282 * @return {mixed} Filtered value
283 */
284 filterValue (rawValue) {
285 if (this._filterValueCallback !== null) {
286 return this._filterValueCallback(rawValue, this)
287 }
288 // Generic field objects don't filter
289 return rawValue
290 }
291
292 /**
293 * Returns true, if the field is randomizable.

Callers 1

setValueMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected