danger
Version:
Unit tests for Team Culture
15 lines • 490 B
JavaScript
;
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