registration
This commit is contained in:
13
frontend/style/node_modules/date-fns/isPast.js
generated
vendored
13
frontend/style/node_modules/date-fns/isPast.js
generated
vendored
@@ -1,6 +1,4 @@
|
||||
"use strict";
|
||||
exports.isPast = isPast;
|
||||
var _index = require("./toDate.js");
|
||||
import { toDate } from "./toDate.js";
|
||||
|
||||
/**
|
||||
* @name isPast
|
||||
@@ -11,8 +9,6 @@ var _index = require("./toDate.js");
|
||||
* @description
|
||||
* Is the given date in the past?
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The date to check
|
||||
*
|
||||
* @returns The date is in the past
|
||||
@@ -22,6 +18,9 @@ var _index = require("./toDate.js");
|
||||
* const result = isPast(new Date(2014, 6, 2))
|
||||
* //=> true
|
||||
*/
|
||||
function isPast(date) {
|
||||
return +(0, _index.toDate)(date) < Date.now();
|
||||
export function isPast(date) {
|
||||
return +toDate(date) < Date.now();
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default isPast;
|
||||
|
||||
Reference in New Issue
Block a user