Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A minimal high performance date library for Node.js and Browser. Use it to compare and manipulate dates.
A minimal high performance date library for Node.js and Browser. Use it to compare and manipulate dates.
npm install instadate
Current popular date libraries put a lot of effort into doing a lot of things correctly. Instadate on the other hand only has a handful of features that are all geared towards performance. Instadate is more of a wrapper around the native JavaScript Date than a full on date library.
Use Instadate when you need to run thousands of date manipulations or comparisons per second .
Instadate..
npm test
NB! Documentation is a WIP, look at source for all functions
instadate.utc(date)
Returns the UTC time in milliseconds.
instadate.noon(date)
Returns a copy of the date with hours set to 12 and minutes, seconds and milliseconds set to 0.
instadate.differenceInDays(from, to)
Returns the difference in days (24 hour periods) between two dates. Returned result can be negative.
instadate.differenceInHours(from, to)
Returns the difference in hours (60 minute periods) between two dates. Returned result can be negative.
instadate.differenceInDays(from, to)
Returns the difference in days (24 hour periods) between two dates. Returned result can be negative.
instadate.differenceInWeekendDays(from, to)
Returns the difference in days (24 hour periods) between two dates. Excludes weekend days. Returned result can be negative.
instadate.differenceInWorkDays(from, to)
Returns the difference in days (24 hour periods) between two dates. Excludes weekend days. Returned result can be negative.
FAQs
A minimal high performance date library for Node.js and Browser
The npm package instadate receives a total of 529 weekly downloads. As such, instadate popularity was classified as not popular.
We found that instadate 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.