Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A small library that provides a few very useful methods for displaying dates, including a formatter and a parser.
$ npm install dateable
var dateable = require('dateable');
var str = dateable.format(new Date(), 'MM/DD-YYYY, hh:mm'); // e.g., 03/23-2012, 22:10
dateable.parse(str, 'MM/DD-YYYY, hh:mm') // Returns the original date
If you want to include text in the formatting, just escape it with either ' or ".
var date = new Date(2009, 4, 23)
, format = '"I went to the moon in" YYYY. "I think it was a" dddd "in" MMMM';
dateable.format(date, format); // I went to the moon in 2009. I think it was a Saturday in May
You can also get the answers to simple questions, such as:
var date = new Date(2008, 4, 20);
dateable.when(date); // 4 years ago
// The same question can be asked for future days
dateable.when(new Date(2020, 4, 30)); // in 8 years
// And...
dateable.diff(new Date(2015), new Date()); // 3 years
Because dealing with dates in javascript is a fucking pain in the ass!
FAQs
A date formatter and parser for node
We found that dateable 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.