c8y-openlayer
Version:
This module is designed to help integrate Openlayer with Cumulocity IoT
15 lines (12 loc) • 346 B
JavaScript
import _ol_AssertionError_ from './assertionerror.js';
var _ol_asserts_ = {};
/**
* @param {*} assertion Assertion we expected to be truthy.
* @param {number} errorCode Error code.
*/
_ol_asserts_.assert = function(assertion, errorCode) {
if (!assertion) {
throw new _ol_AssertionError_(errorCode);
}
};
export default _ol_asserts_;