UNPKG

honkit

Version:

HonKit is building beautiful books using Markdown.

19 lines (18 loc) 651 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const immutable_1 = __importDefault(require("immutable")); const moment_1 = __importDefault(require("moment")); exports.default = immutable_1.default.Map({ // Format a date // ex: 'MMMM Do YYYY, h:mm:ss a date: function (time, format) { return (0, moment_1.default)(time).format(format); }, // Relative Time dateFromNow: function (time) { return (0, moment_1.default)(time).fromNow(); } });