UNPKG

bingo-functional-js

Version:

A port of the PHP bingo-functional library

15 lines (12 loc) 224 B
/** * isError function * isError :: a -> Bool * @param {*} val * @returns {boolean} * @example * * isError(new Error('fail')) * // => true */ const isError = (val) => val instanceof Error module.exports = isError