UNPKG

@pact-foundation/pact

Version:
21 lines 750 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.numberToSpec = void 0; const v3_1 = require("../v3"); const numberToSpec = (spec, defaultSpec = v3_1.SpecificationVersion.SPECIFICATION_VERSION_V2) => { if (!spec) { return defaultSpec; } switch (spec) { case 2: return v3_1.SpecificationVersion.SPECIFICATION_VERSION_V2; case 3: return v3_1.SpecificationVersion.SPECIFICATION_VERSION_V3; case 4: return v3_1.SpecificationVersion.SPECIFICATION_VERSION_V4; default: throw new Error(`invalid pact specification version supplied: ${spec}`); } }; exports.numberToSpec = numberToSpec; //# sourceMappingURL=spec.js.map