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

Method setWhitelistChars

src/Field/Text.js:104–110  ·  view source on GitHub ↗

* Restricts the value to the given set of Unicode code points. * @param {?number[]|string|Chain} whitelistChars Whitelist code points * @param {boolean} [revalidate=true] Wether to revalidate current value * @return {TextField} Fluent interface

(whitelistChars, revalidate = true)

Source from the content-addressed store, hash-verified

102 * @return {TextField} Fluent interface
103 */
104 setWhitelistChars (whitelistChars, revalidate = true) {
105 this._whitelistChars =
106 whitelistChars !== null
107 ? Chain.wrap(whitelistChars).getCodePoints()
108 : null
109 return revalidate ? this.revalidateValue() : this
110 }
111
112 /**
113 * Returns the blacklisted Unicode code points.

Callers 3

constructorMethod · 0.95
settingValueDidChangeMethod · 0.80
settingValueDidChangeMethod · 0.80

Calls 3

getCodePointsMethod · 0.80
wrapMethod · 0.80
revalidateValueMethod · 0.80

Tested by

no test coverage detected