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

Method isWhitespace

src/StringUtil.js:52–55  ·  view source on GitHub ↗

* Returns true, if given string contains a whitespace at given index. * @param {string} string * @param {number} [index=0] * @return {boolean}

(string, index = 0)

Source from the content-addressed store, hash-verified

50 * @return {boolean}
51 */
52 static isWhitespace (string, index = 0) {
53 const character = string[index]
54 return character ? character.match(/\s/) !== null : false
55 }
56
57 /**
58 * Removes Unicode whitespace characters.

Callers 2

encodeCharacterMethod · 0.80
performTranslateMethod · 0.80

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected