npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ocdla/timer

v0.2.5

Published

Create text files; add content and headings to text files.

Downloads

10

Readme

��## Links Controller Links Main

Timer

Represents a Timer with countdown functionality.

Versions

Version 0.2.0

removed several exports now just exporting one Timer no longer renders itself providing a new ontick method

Version 0.2.1

forgot to add changelog

Version 0.2.3

Changes to file path, now it is using path resolves in the project. General clean up of unwanted comments

Version 0.2.4

modified path spec to go from the @ocdla file located in node_modules

Version 0.2.5

Added new Component to display query

Kind: global class

timer.g

The generator used to display units (usually seconds) for this timer.

Kind: instance property of Timer

timer.interval : number

Rederce to the interval used for timer updates

Kind: instance property of Timer

timer.callbacks

Array to store csllback functions

Kind: instance property of Timer

timer.start()

Start the timer and trigger tick function at specified intervals.

Kind: instance method of Timer

timer.stop()

Stop the timer.

Kind: instance method of Timer

timer.tick(seconds)

Execute callback functions with the current time values.

Kind: instance method of Timer

| Param | Type | Description | | --- | --- | --- | | seconds | number | The remaining seconds on the timer. |

timer.onTick(fn)

Register a callback function to be executed on each tick.

Kind: instance method of Timer

| Param | Type | Description | | --- | --- | --- | | fn | function | The callback function to be executed. |

Timer.convertTimer(sec) ��� Array.<number>

Convert total seconds into hours, minutes, and seconds.

Kind: static method of Timer
Returns: Array.<number> - - An array containing hours, minutes, and seconds.

| Param | Type | Description | | --- | --- | --- | | sec | number | The total seconds to convert. |

Timer.padTimer(number) ��� string

Pad a number with a leading zero if it is less than 10.

Kind: static method of Timer
Returns: string - - The padded number as a string.

| Param | Type | Description | | --- | --- | --- | | number | number | The number to pad. |

Timer.parse(seconds, pad) ��� Array.<string>

Parse total seconds into hours, minutes, and seconds.

Kind: static method of Timer
Returns: Array.<string> - - An array containing hour, minute, and second strings.

| Param | Type | Default | Description | | --- | --- | --- | --- | | seconds | number | | The total seconds to parse. | | pad | boolean | true | Whether to pad the values with zeros. |

Timer.toSeconds(hours, minutes, seconds) ��� number

Convert hours, minutes, and seconds into total seconds.

Kind: static method of Timer
Returns: number - - The total seconds equivalent.

| Param | Type | Description | | --- | --- | --- | | hours | number | The hours component. | | minutes | number | The minutes component. | | seconds | number | The seconds component. |