react-girocode
Version:
A react component for displaying an EPC-QR-Code
13 lines (12 loc) • 385 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.StringOfLength = StringOfLength;
function StringOfLength(input, { max }) {
if (input === undefined) {
return StringOfLength("", { max });
}
if (input.length > max) {
throw new Error(`Input "${input}" is longer than specified max lenght ${max}`);
}
return input;
}