1.0.2 • Published 7 years ago

time-to-emoji v1.0.2

Weekly downloads
5
License
ISC
Repository
github
Last release
7 years ago

Time to Emoji

Have you ever wanted a time visualized by an emoji?

If your answer was yes, then today is your lucky day!

Now with this package it is possible to parse

  • hour, minute either as string or integer
  • string in 'HH:MM' format
  • Date

into an clock face emoji! WOAHH!

Usage

  1. Install the package

    npm install time-to-emoji --save

  2. require the package

        var clockface = require('time-to-emoji');
  3. Use the function of your choice

    Available Functions:

        clockface.time2emoji('HH','MM'); // with leading zeros
        clockface.time2emoji('H','M');
        clockface.time2emoji(H,M);
    
        Date.prototype.toEmoji();
        // usage:
        new Date().toEmoji();
    
        clockface.date2emoji(new Date());
    
        clockface.string2emoji('HH:MM');
  4. Visualize Time 🕛🕧🕐🕜🕑

You can find basic tests of this package in test.js

Contribution is welcomed 👐