Files
openlayers/src/ol/asserts.js
Tim Schaub 7f47883c48 Transformed
2017-12-12 06:53:18 -07:00

18 lines
376 B
JavaScript

/**
* @module ol/asserts
*/
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_;