UNPKG

@metamask/snaps-utils

Version:
21 lines 532 B
import { assert } from "@metamask/utils"; import { assertIsSnapIcon } from "../../icon.mjs"; /** * Verify the structure of the snap icon. */ export const isSnapIcon = { severity: 'error', structureCheck(files, context) { if (!files.svgIcon) { return; } try { assertIsSnapIcon(files.svgIcon); } catch (error) { assert(error instanceof Error); context.report(error.message); } }, }; //# sourceMappingURL=is-snap-icon.mjs.map