UNPKG

ramda-adjunct

Version:

Ramda Adjunct is the most popular and most comprehensive set of utilities for use with Ramda, providing a variety of useful, well tested functions with excellent documentation.

30 lines (25 loc) 897 B
"use strict"; exports.__esModule = true; exports["default"] = void 0; var _ramda = require("ramda"); var _curry = _interopRequireDefault(require("ramda/src/internal/_curry1")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * Checks if value is `Date` object. * * @func isDate * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/0.6.0|v0.6.0} * @category Type * @sig * -> Boolean * @param {*} val The value to test * @return {boolean} * @see {@link RA.isNotDate|isNotDate}, {@link RA.isValidDate|isValidDate}, {@link RA.isNotValidDate|isNotValidDate} * @example * * RA.isDate(new Date()); //=> true * RA.isDate('1997-07-16T19:20+01:00'); //=> false */ var isDate = (0, _curry["default"])((0, _ramda.pipe)(_ramda.type, (0, _ramda.identical)('Date'))); var _default = isDate; exports["default"] = _default;