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:
1.0 KB
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | exports.__esModule = true;
|
---|
4 | exports["default"] = void 0;
|
---|
5 | var _ramda = require("ramda");
|
---|
6 | var _isDate = _interopRequireDefault(require("./isDate"));
|
---|
7 | var _isNotNaN = _interopRequireDefault(require("./isNotNaN"));
|
---|
8 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
---|
9 | /* eslint-disable max-len */
|
---|
10 | /**
|
---|
11 | * Checks if value is valid `Date` object.
|
---|
12 | *
|
---|
13 | * @func isValidDate
|
---|
14 | * @memberOf RA
|
---|
15 | * @since {@link https://char0n.github.io/ramda-adjunct/1.8.0|v1.8.0}
|
---|
16 | * @category Type
|
---|
17 | * @sig * -> Boolean
|
---|
18 | * @param {*} val The value to test
|
---|
19 | * @return {boolean}
|
---|
20 | * @see {@link RA.isDate|isDate}, {@link RA.isNotDate|isNotDate}, {@link RA.isNotValidDate|isNotValidDate}
|
---|
21 | * @example
|
---|
22 | *
|
---|
23 | * RA.isValidDate(new Date()); //=> true
|
---|
24 | * RA.isValidDate(new Date('a')); //=> false
|
---|
25 | */
|
---|
26 | /* eslint-enable max-len */
|
---|
27 | var isValidDate = (0, _ramda.curryN)(1, (0, _ramda.both)(_isDate["default"], (0, _ramda.pipe)((0, _ramda.invoker)(0, 'getTime'), _isNotNaN["default"])));
|
---|
28 | var _default = isValidDate;
|
---|
29 | exports["default"] = _default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.