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

@falieson/js-second

v2.0.0

Published

Tired of repeating common ms and second calculations in most projects? Centralize and harden these ideas with a repo!

Downloads

13

Readme

@falieson/js-second

Tired of repeating common ms and second calculations throughout your repositories? Let's centralize and harden these ideas with a repo!

Install

$ npm i -S @falieson/js-second
$ yarn @falieson/js-second

Aliases

second - s, sec, seconds

millisecond - ms, msec, milliseconds

imports

get a year amount of seconds

import time from "@falieson/js-second"
console.log(time.second.year) // 31536000
import {second} from "@falieson/js-second"
console.log(second.year) // 31536000

get a year amount of milliseconds

import time from "@falieson/js-second"
console.log(time.millisecond.year) // 31536000000
import {millisecond} from "@falieson/js-second"
console.log(millisecond.year) // 31536000000

Calculations

| Alias | second | millisecond | Description | |---------------|----------|-------------|-------------| | unit | 1 | 1 | 1 unit of | | second | 1 | 1000 | 1 sec | | quarterMinute | 15 | 15000 | 15 sec | | halfMinute | 30 | 30000 | 30 sec | | minute | 60 | 60000 | 60 sec | | doubleMinute | 120 | 120000 | 2 mins | | fiveMinute | 300 | 300000 | 5 mins | | quarterHour | 900 | 900000 | 15 mins | | halfHour | 1800 | 1800000 | 30 mins | | hour | 3600 | 3600000 | 60 mins | | quarterDay | 21600 | 21600000 | 3 hours | | halfDay | 43200 | 43200000 | 6 hours | | day | 86400 | 86400000 | 24 hours | | week | 604800 | 604800000 | 7 days | | doubleWeek | 1209600 | 1209600000 | 14 days | | halfMonth | 1296000 | 1296000000 | 15 days | | month | 2592000 | 2592000000 | 30 days | | quarterYear | 7862400 | 7862400000 | 91 days | | halfYear | 15724800 | 15724800000 | 182 days | | year | 31536000 | 31536000000 | 365 days |