summaryrefslogtreecommitdiff
path: root/alarm/node_modules/graphql/jsutils/invariant.mjs
blob: f1aa4a68bc936073f926e2c053edf7d5834e314c (plain)
1
2
3
4
5
6
7
export default function invariant(condition, message) {
  var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')

  if (!booleanCondition) {
    throw new Error(message != null ? message : 'Unexpected invariant triggered.');
  }
}