@harmoniclabs/plu-ts-onchain
Version:
An embedded DSL for Cardano smart contracts creation coupled with a library for Cardano transactions, all in Typescript
10 lines (9 loc) • 495 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getValidVersion = exports.defaultVersion = void 0;
exports.defaultVersion = Object.freeze([1, 1, 0]);
function getValidVersion(version) {
var v = !Array.isArray(version) || version.length === 0 ? exports.defaultVersion : version;
return ([0, 1, 2].map(function (i) { var _a; return Math.abs(Math.round((_a = v[i]) !== null && _a !== void 0 ? _a : 0)); }));
}
exports.getValidVersion = getValidVersion;