source: node_modules/ramda-adjunct/lib/isError.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 776 bytes
RevLine 
[d24f17c]1"use strict";
2
3exports.__esModule = true;
4exports["default"] = void 0;
5var _ramda = require("ramda");
6/**
7 * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`, `TypeError` or `URIError` object.
8 *
9 * @func isError
10 * @category Type
11 * @memberOf RA
12 * @since {@link https://char0n.github.io/ramda-adjunct/2.30.0|v2.30.0}
13 * @sig * -> Boolean
14 * @param {*} val The value to test
15 * @return {boolean} Returns `true` if value is an error object, `false` otherwise
16 * @example
17 *
18 * RA.isError(new Error()); //=> true
19 * RA.isError(Error); //=> false
20 * RA.isError(1); // => false
21 */
22var isError = (0, _ramda.curryN)(1, (0, _ramda.pipe)(_ramda.type, (0, _ramda.identical)('Error')));
23var _default = isError;
24exports["default"] = _default;
Note: See TracBrowser for help on using the repository browser.