Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

analog-clock

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

analog-clock

An analog clock component

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22
decreased by-35.29%
Maintainers
1
Weekly downloads
 
Created
Source

<analog-clock>

An analog clock component written in plain JavaScript:

screen shot 2018-12-12 at 6 00 19 pm

Usage

Basic usage with local time:

<analog-clock></analog-clock>

Providing a time attribute will set the exact time and not update the clock.

<analog-clock time="1301757851000"></analog-clock>

Providing an offset sets the time zone offset. The following sets the time in New York:

<analog-clock offset="-5"></analog-clock>

JavaScript

Anything you can do in HTML with attributes can also be done using the JavaScript API with properties:

import { AnalogClock } from './path/to/clock.js';

let clock = new AnalogClock();
clock.offset = -6;

document.body.appendChild(clock);

License

BSD-2-Clause

FAQs

Package last updated on 10 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc