airgap-coin-lib
Version:
The airgap-coin-lib is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.
16 lines • 598 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.assertNever = function (x) { return undefined; };
function assertFields(name, object) {
var fields = [];
for (var _i = 2; _i < arguments.length; _i++) {
fields[_i - 2] = arguments[_i];
}
fields.forEach(function (field) {
if (object[field] === undefined || object[field] === null) {
throw new Error(name + ", required: " + fields.join(', ') + ", but " + field + " is missing.");
}
});
}
exports.assertFields = assertFields;
//# sourceMappingURL=assert.js.map