MCPcopy
hub / github.com/streetwriters/notesnook / write

Method write

apps/mobile/worker.js:1960–1973  ·  view source on GitHub ↗

* Parses a chunk of data and calls the corresponding callbacks. * * @param chunk Chunk to parse.

(chunk)

Source from the content-addressed store, hash-verified

1958 * @param chunk Chunk to parse.
1959 */
1960 write(chunk) {
1961 var _a, _b;
1962 if (this.ended) {
1963 (_b = (_a = this.cbs).onerror) === null || _b === void 0
1964 ? void 0
1965 : _b.call(_a, new Error(".write() after done!"));
1966 return;
1967 }
1968 this.buffers.push(chunk);
1969 if (this.tokenizer.running) {
1970 this.tokenizer.write(chunk);
1971 this.writeIndex++;
1972 }
1973 }
1974 /**
1975 * Parses the end of the buffer and clears the stack, calls onend.
1976 *

Callers 5

highlightHtmlContentFunction · 0.95
toTextContentFunction · 0.95
endMethod · 0.95
parseChunkMethod · 0.95
parseFromStringFunction · 0.95

Calls 3

callMethod · 0.80
writeMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected