/**
 * Use assert function to assert expression assumes to be true.
 */

/**
 * @param {Boolean} condition
 * @param {String} message
 */
function assert(condition, message) {
  if (message === undefined) {
    throw new Error('assert requires an error message argument')
  }

  let error

  if (!condition) {
    error = new Error(message)
    error.name = 'Assertion'
    throw error
  }
}

export default assert

@@ -361,16 +361,21 @@
 ssertion
+Error
 '%0A    th

throw error with name AssertionError