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

Method setMaxSize

src/Field/Byte.js:65–71  ·  view source on GitHub ↗

* Sets max size in bytes. * @param {?number} maxSize Maximum size in bytes * @param {boolean} [revalidate=true] Wether to revalidate current value. * @return {ByteField} Fluent interface

(maxSize, revalidate = true)

Source from the content-addressed store, hash-verified

63 * @return {ByteField} Fluent interface
64 */
65 setMaxSize (maxSize, revalidate = true) {
66 if (this._maxSize === maxSize) {
67 return this
68 }
69 this._maxSize = maxSize !== null ? parseInt(maxSize) : null
70 return revalidate ? this.revalidateValue() : this
71 }
72
73 /**
74 * Validates given raw value.

Callers 2

constructorMethod · 0.95
settingValueDidChangeMethod · 0.80

Calls 1

revalidateValueMethod · 0.80

Tested by

no test coverage detected