opentype.features.js
Version:
Library to list opentype fonts optional features.
19 lines (18 loc) • 596 B
JavaScript
;
// Run-time checking of preconditions.
Object.defineProperty(exports, "__esModule", { value: true });
exports.assert = exports.argument = exports.fail = void 0;
function fail(message) {
throw new Error(message);
}
exports.fail = fail;
// Precondition function that checks if the given predicate is true.
// If not, it will throw an error.
function argument(predicate, message) {
if (!predicate) {
fail(message);
}
}
exports.argument = argument;
exports.assert = argument;
exports.default = { fail: fail, argument: argument, assert: argument };