MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / writeBytes

Method writeBytes

lib.commonjs/abi/coders/abstract-coder.js:369–376  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

367 }
368 // Arrayish item; pad on the right to *nearest* WordSize
369 writeBytes(value) {
370 let bytes = (0, index_js_1.getBytesCopy)(value);
371 const paddingOffset = bytes.length % exports.WordSize;
372 if (paddingOffset) {
373 bytes = (0, index_js_1.getBytesCopy)((0, index_js_1.concat)([bytes, Padding.slice(paddingOffset)]));
374 }
375 return this.#writeData(bytes);
376 }
377 // Numeric item; pad on the left *to* WordSize
378 writeValue(value) {
379 return this.#writeData(getValue(value));

Callers 3

encodeMethod · 0.45
encodeMethod · 0.45
encodeMethod · 0.45

Calls 2

#writeDataMethod · 0.95
sliceMethod · 0.45

Tested by

no test coverage detected