UNPKG

danger

Version:
15 lines 490 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.encodingParser = void 0; /** * Verifies that the given encoding is a valid BufferEncoding. * @throws in case the encoding is unsupported. */ function encodingParser(encoding) { if (Buffer.isEncoding(encoding)) { return encoding; } throw new Error("Unsupported buffer encoding ".concat(encoding)); } exports.encodingParser = encodingParser; //# sourceMappingURL=encodingParser.js.map