UNPKG

@badeball/cypress-cucumber-preprocessor

Version:

[![Build status](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml/badge.svg)](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml) [![Npm package weekly downloads](https://badgen.net/n

26 lines (25 loc) 748 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.assertIsString = exports.assertAndReturn = exports.assert = exports.fail = void 0; const error_1 = require("./error"); const type_guards_1 = require("./type-guards"); function fail(message) { throw (0, error_1.createError)(message); } exports.fail = fail; function assert(value, message) { if (value != null) { return; } fail(message); } exports.assert = assert; function assertAndReturn(value, message) { assert(value, message); return value; } exports.assertAndReturn = assertAndReturn; function assertIsString(value, message) { assert((0, type_guards_1.isString)(value), message); } exports.assertIsString = assertIsString;