@difizen/mana-common
Version:
19 lines (17 loc) • 717 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ok = ok;
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/**
* Throws an error with the provided message if the provided value does not evaluate to a true Javascript value.
*/
function ok(value, message) {
if (!value) {
throw new Error(message ? "Assertion failed (".concat(message, ")") : 'Assertion Failed');
}
}