
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
ago
is a simple function for calculating a timestamp some amount of time ago. (or in the future)
var ago = require("ago")
ago(344) // 344 milliseconds ago, e.g. 1376505400233
ago(344, "ms") // same as above, default unit is "ms"
ago(4, "minutes") // four minutes ago
ago(3, "days") // 3 * 24 hours ago
ago(1, "quarter") // one quarter (13 weeks) ago
ago(2, "months") // months are approximate (30.4375 days)
ago(22, "y") // years are approximate as well (365.25 days)
console.log(new Date(ago(35.3086, "y")))
// Mon Apr 24 1978 00:06:49 GMT-0800 (PDT)
// It also exposes a fromNow() function to calculate future times. e.g:
ago.fromNow(1, "year")
// is just sugar for:
ago(-1, "year")
ago(number [,unit])
Calculate a millisecond epoch timestamp relative to right now.
ago.fromNow(number [,unit])
This is a convenience function for ago(-number, [,unit])
for finding timestamps in the future.
MIT
FAQs
A tool for calculating relative timestamps to now.
The npm package ago receives a total of 100 weekly downloads. As such, ago popularity was classified as not popular.
We found that ago demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.