
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Humanizer a value. Humanizer provides "ago" libraries-like capabilities and so on...
In fact, unlike other libraries, humanizer can work with any type of unit at any scale.
Humanizer is tested against browsers and NodeJS.
npm install humanizer
var Humanizer = require('humanizer');
// Define the time unit
time = new Humanizer('ms', 1) // the base unit is 1 `ms`
.unit('day', 24*3600*1000)
.unit('hour', 3600*1000)
.unit('min', 60*1000)
.unit('sec', 1000)
.setRound(function roundFn(val){ // set a (optional) round function
return Math.round(val*10)/10;
});
// time.humanize(value, [preferedUnit]);
time.humanize(60*1000); // [60, 'sec']
time.humanize(20*3600*1000); // [20, 'hour']
time.humanize(20*3600*1000, 'sec'); // [20, 'sec'] (feels more like a conversion to me though)
// time.humanizeRange(value, start, end, [preferedUnit]);
time.humanizeRange(4956, +new Date(2013, 3, 29), +new Date(2013, 3, 29, 15, 47)));
// -> [314, 'hour']
// -> 314 'things' by `hour`
FAQs
Humanize a value.
The npm package humanizer receives a total of 113 weekly downloads. As such, humanizer popularity was classified as not popular.
We found that humanizer 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
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.