
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@arcjet/duration
Advanced tools
@arcjet/duration
Arcjet utilities for parsing duration strings.
This is an internal utility that exists so our users can pass meaningful
duration strings such as 1h
instead of having to manually calculate seconds
or milliseconds.
We turned the Go [ParseDuration
][go-parser] into TypeScript so that we have
the exact same functionality in both languages.
You should not use this but use one of the many alternatives such as
vercel/ms
.
This package matches our current needs which are likely different from yours.
This package is ESM only. Install with npm in Node.js:
npm install @arcjet/duration
import { parse } from "@arcjet/duration";
const seconds = parse("1h");
console.log(seconds); // prints 3600
Apache License, Version 2.0 © Arcjet Labs, Inc.
Derivative work based on time.ParseDuration
from
golang/go
licensed under BSD-3.0 © The Go Authors.
Our work ports to TypeScript.
1.0.0-beta.12 (2025-09-22)
workerd
(#5077) (13c90d6)characteristics
in logs (#5078) (9839c9c)remix-express
(#5115) (783db87)experimental.nodeMiddleware
from example (#5124) (408a26e)FAQs
Arcjet utilities for parsing duration strings
The npm package @arcjet/duration receives a total of 16,838 weekly downloads. As such, @arcjet/duration popularity was classified as popular.
We found that @arcjet/duration demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.