binary-clock-js
v2.0.0
Published
Display Binary Clock
Downloads
6
Maintainers
Readme
Binary Clock JS
This displays the draws the Binary Clock on a Canvas or Terminal
Directory Structure
node
: this directory contains the example usage of this library in node js environmentweb
: this directory contains the example usage of this library in browser environmentbinary-clock.js
: source code of the library.package.json
: package info
Screenshots
Integration Steps for Web
Install
binary-clock-js
throughnpm
.npm i binary-clock-js -s
Add
canvas
tag to your html as below<canvas id="binary-clock-canvas"></canvas>
Add the
binary-clock.js
script to your html as below<script src="/path_to_node_modules/binary-clock-js/binary-clock.js"></script> <script> new BinaryClock(new Date(), document.getElementById('binary-clock-canvas')) </script>
Web Demo: Link
Integration Steps for Terminal
Install
binary-clock-js
throughnpm
.npm i binary-clock-js -s
Import
BinaryClock
to your application.let { BinaryClock } = require('binary-clock');
Use the below function same as in Web
(Second parameter should be
null
as it is used forcanvas
object in theweb
implementation)// Usage with Default Options new BinaryClock(); // Usage with autoUpdate false new BinaryClock(new Date(), null, {autoUpdate: false});