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

Function asMap

js/bundle/src/decoder.ts:246–251  ·  view source on GitHub ↗
(x: unknown)

Source from the content-addressed store, hash-verified

244}
245
246function asMap(x: unknown): Map<string, unknown> {
247 if (x instanceof Map) {
248 return x as Map<string, unknown>;
249 }
250 throw new Error('Map expected, but got ' + typeof x);
251}
252
253function asNumber(x: unknown): number {
254 if (typeof x === 'number') {

Callers 1

indexSectionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected