UNPKG

nhb-toolbox

Version:

A versatile collection of smart, efficient, and reusable utility functions, classes and types for everyday development needs.

11 lines (10 loc) 371 B
import { getGreeting } from '../greet.js'; export const greetingPlugin = ($Chronos) => { $Chronos.prototype.getGreeting = function (configs) { const currentTime = this.formatStrict('HH:mm'); return getGreeting({ currentTime, ...configs }); }; $Chronos.prototype.greet = function (configs) { return this.getGreeting(configs); }; };