epoch-seconds
Version:
Returns the seconds passed since Unix epoch.
18 lines • 511 B
TypeScript
/** @module epoch-seconds
*/
declare module "epoch-seconds" {
/**
* @function
* @param {number} [compareValue]
* @returns {number} Seconds passed since Unix epoch (01 January 1970)
* @example
* import epochSeconds from "epoch-seconds"
* const result = epochSeconds()
* result === 1549410770
* setTimeout(() => {
* const result2 = epochSeconds(result)
* result2 === 3
* }, 3000)
*/
export default function(compareValue?: number): number;
}