Skip to content

Commit

Permalink
fix(isDate): make this predicate work in different realms
Browse files Browse the repository at this point in the history
Closes #724
  • Loading branch information
char0n committed Nov 27, 2018
1 parent b89ade0 commit 1963c2d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/isDate.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { is } from 'ramda';
import { type, identical, pipe } from 'ramda';

/* eslint-disable max-len */
/**
* Checks if value is `Date` object.
*
Expand All @@ -17,7 +16,9 @@ import { is } from 'ramda';
* RA.isDate(new Date()); //=> true
* RA.isDate('1997-07-16T19:20+01:00'); //=> false
*/
/* eslint-enable max-len */
const isDate = is(Date);
const isDate = pipe(
type,
identical('Date')
);

export default isDate;

0 comments on commit 1963c2d

Please sign in to comment.