UNPKG

svg-color-linter

Version:

Linting tool to check if SVG files use only colors of a given color palette

14 lines (13 loc) 445 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.readSvgFile = void 0; const promises_1 = require("node:fs/promises"); const readSvgFile = async (fileName) => { try { return await (0, promises_1.readFile)(fileName, 'utf8'); } catch (error) { throw new Error(`Could not read file "${fileName}". Make sure it exists on the file system.`); } }; exports.readSvgFile = readSvgFile;