made with requirebin
Created
August 4, 2015 12:00
-
-
Save samternent/9e3a6fa32be460e02325 to your computer and use it in GitHub Desktop.
requirebin sketch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// hello world | |
var clockmoji = require('clockmoji'); | |
var comp = document.getElementById('component').innerHTML = clockmoji(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({clockmoji:[function(require,module,exports){module.exports=clock;function clock(time){var date=new Date;if(time){var timeSplit=time.split(":");date.setHours(0+timeSplit[0]);date.setMinutes(0+timeSplit[1])}date=new Date(date.getTime()+15*6e4);var shortHand=date.getHours()%12;var min=date.getMinutes();var longHand=(min-min%30)/30?"30":"00";var clockTime=""+shortHand+":"+longHand;return emojiClock(clockTime)}function emojiClock(time){if(time==="0:00"||time==="12:00")return"π";if(time==="0:30"||time==="12:30")return"π§";if(time==="1:00"||time==="13:00")return"π";if(time==="1:30"||time==="13:30")return"π";if(time==="2:00"||time==="14:00")return"π";if(time==="2:30"||time==="14:30")return"π";if(time==="3:00"||time==="15:00")return"π";if(time==="3:30"||time==="15:30")return"π";if(time==="4:00"||time==="16:00")return"π";if(time==="4:30"||time==="16:30")return"π";if(time==="5:00"||time==="17:00")return"π";if(time==="5:30"||time==="17:30")return"π ";if(time==="6:00"||time==="18:00")return"π";if(time==="6:30"||time==="18:30")return"π‘";if(time==="7:00"||time==="19:00")return"π";if(time==="7:30"||time==="19:30")return"π’";if(time==="8:00"||time==="20:00")return"π";if(time==="8:30"||time==="20:30")return"π£";if(time==="9:00"||time==="21:00")return"π";if(time==="9:30"||time==="21:30")return"π€";if(time==="10:00"||time==="22:00")return"π";if(time==="10:30"||time==="22:30")return"π₯";if(time==="11:00"||time==="23:00")return"π";if(time==="11:30"||time==="23:30")return"π¦";return"β "}},{}]},{},[]);var clockmoji=require("clockmoji");var comp=document.getElementById("component").innerHTML=clockmoji(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "requirebin-sketch", | |
"version": "1.0.0", | |
"dependencies": { | |
"clockmoji": "1.0.2" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- contents of this file will be placed inside the <body> --> | |
<div id="component"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- contents of this file will be placed inside the <head> --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment