'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _assertionerror = require('./assertionerror.js');

var _assertionerror2 = _interopRequireDefault(_assertionerror);

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : { default: obj };
}

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 _assertionerror2.default(errorCode);
  }
};
exports.default = _ol_asserts_;
module.exports = exports['default'];