registration
This commit is contained in:
13
frontend/style/node_modules/date-fns/isFuture.js
generated
vendored
13
frontend/style/node_modules/date-fns/isFuture.js
generated
vendored
@@ -1,6 +1,4 @@
|
||||
"use strict";
|
||||
exports.isFuture = isFuture;
|
||||
var _index = require("./toDate.js");
|
||||
import { toDate } from "./toDate.js";
|
||||
|
||||
/**
|
||||
* @name isFuture
|
||||
@@ -11,8 +9,6 @@ var _index = require("./toDate.js");
|
||||
* @description
|
||||
* Is the given date in the future?
|
||||
*
|
||||
* @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 future
|
||||
@@ -22,6 +18,9 @@ var _index = require("./toDate.js");
|
||||
* const result = isFuture(new Date(2014, 11, 31))
|
||||
* //=> true
|
||||
*/
|
||||
function isFuture(date) {
|
||||
return +(0, _index.toDate)(date) > Date.now();
|
||||
export function isFuture(date) {
|
||||
return +toDate(date) > Date.now();
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default isFuture;
|
||||
|
||||
Reference in New Issue
Block a user