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

Method isEmpty

src/Chain.js:358–365  ·  view source on GitHub ↗

* Returns true if chain contains an empty string, zero Unicode * characters or zero bytes. * @return {boolean}

()

Source from the content-addressed store, hash-verified

356 * @return {boolean}
357 */
358 isEmpty () {
359 return (
360 this === emptyChain ||
361 (this._codePoints !== null && this._codePoints.length === 0) ||
362 (this._string !== null && this._string === '') ||
363 (this._bytes !== null && this._bytes.length === 0)
364 )
365 }
366
367 /**
368 * Returns true if this chain's content is equal to given chain's content.

Callers 3

isEqualToMethod · 0.95
Chain.jsFile · 0.80
serializeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected