Initial commit (by create-cloudflare CLI)

This commit is contained in:
J-onasJones 2023-09-14 18:58:13 +02:00
commit 58a42872a0
1745 changed files with 741893 additions and 0 deletions

44
node_modules/capnp-ts/src/serialization/object-size.js generated vendored Normal file
View file

@ -0,0 +1,44 @@
"use strict";
/**
* @author jdiaz5513
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.padToWord = exports.getWordLength = exports.getDataWordLength = exports.getByteLength = exports.ObjectSize = void 0;
const tslib_1 = require("tslib");
const debug_1 = tslib_1.__importDefault(require("debug"));
const _ = tslib_1.__importStar(require("../util"));
const trace = debug_1.default("capnp:object-size");
trace("load");
/**
* A simple object that describes the size of a struct.
*
* @export
* @class ObjectSize
*/
class ObjectSize {
constructor(dataByteLength, pointerCount) {
this.dataByteLength = dataByteLength;
this.pointerLength = pointerCount;
}
toString() {
return _.format("ObjectSize_dw:%d,pc:%d", getDataWordLength(this), this.pointerLength);
}
}
exports.ObjectSize = ObjectSize;
function getByteLength(o) {
return o.dataByteLength + o.pointerLength * 8;
}
exports.getByteLength = getByteLength;
function getDataWordLength(o) {
return o.dataByteLength / 8;
}
exports.getDataWordLength = getDataWordLength;
function getWordLength(o) {
return o.dataByteLength / 8 + o.pointerLength;
}
exports.getWordLength = getWordLength;
function padToWord(o) {
return new ObjectSize(_.padToWord(o.dataByteLength), o.pointerLength);
}
exports.padToWord = padToWord;
//# sourceMappingURL=object-size.js.map