MCPcopy Create free account
hub / github.com/WICG/webpackage / constructor

Method constructor

js/bundle/src/encoder.ts:35–40  ·  view source on GitHub ↗
(formatVersion: FormatVersion = DEFAULT_VERSION)

Source from the content-addressed store, hash-verified

33 private compatAdapter: CompatAdapter;
34
35 constructor(formatVersion: FormatVersion = DEFAULT_VERSION) {
36 if (!isApprovedVersion(formatVersion)) {
37 throw new Error(`Invalid webbundle format version`);
38 }
39 this.compatAdapter = this.createCompatAdapter(formatVersion);
40 }
41
42 createBundle(): Uint8Array {
43 this.compatAdapter.onCreateBundle();

Callers

nothing calls this directly

Calls 2

createCompatAdapterMethod · 0.95
isApprovedVersionFunction · 0.90

Tested by

no test coverage detected