site/node_modules/bail/index.js

13 lines
207 B
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
/**
* Throw a given error.
*
* @param {Error|null|undefined} [error]
* Maybe error.
* @returns {asserts error is null|undefined}
*/
export function bail(error) {
if (error) {
throw error
}
}