Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Represents dates as 3-bytes in msgpack. We assume dates after 1970, and reasonably close to 'now'. Their best use is for fairly short-lived expiration dates (months), which don't require incredible precision (nearest hour or nearest minute is fine). These constraints yield a compression of around 66%, which is fantastic for the intended uses.
var SmD = require('smd');
var s = SmD.now();
// => 53391
var l = SmD.at(s);
// => 1371855692507
var d = SmD.date(s);
// => Fri Jun 21 2013 19:01:32 GMT-0400 (EDT)
var SmD = require('smd')
, msg = require('msgpack');
var d = Date.now();
// => 1371855692507
var s = SmD.from(d);
// => 53391
msg.pack(d);
// => <SlowBuffer cb 42 73 f6 8f 8a 2d b0 00>
msg.pack(r);
// => Pack <SlowBuffer cd d0 8f>
MIT. See LICENSE for details.
FAQs
Represent dates as tiny numbers, losing precision, for compact storage.
The npm package smd receives a total of 1 weekly downloads. As such, smd popularity was classified as not popular.
We found that smd 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.