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

Method split

src/Chain.js:179–184  ·  view source on GitHub ↗

* Splits a chain into an array of chains by separating it, using the * specified separator string or chain to determine where to make each split. * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split * @param {string|Chain} [separator] * @pa

(separator = undefined, limit = undefined)

Source from the content-addressed store, hash-verified

177 * @return {Chain[]}
178 */
179 split (separator = undefined, limit = undefined) {
180 separator = separator instanceof Chain ? separator.toString() : separator
181 return this.getString()
182 .split(separator, limit)
183 .map(stringPart => Chain.wrap(stringPart, this._encoding))
184 }
185
186 /**
187 * Returns the characters in a string beginning at the specified location

Callers 15

performEncodeMethod · 0.80
performDecodeMethod · 0.80
performDecodeMethod · 0.80
performDecodeMethod · 0.80
performEncodeMethod · 0.80
performDecodeMethod · 0.80
buildTranslationMapMethod · 0.80
performTranslateMethod · 0.80
performEncodeMethod · 0.80

Calls 3

getStringMethod · 0.95
toStringMethod · 0.80
wrapMethod · 0.80

Tested by

no test coverage detected