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 simple gem that returns Date objects for holidays
Currently has methods to find the 10 US federal holidays, with year as an optional argument that defaults to the current year.
Holidate.new_years_day # alias: new_year
Holidate.martin_luther_king_jr_day # alias: mlk
Holidate.washingtons_birthday # alias: washington
Holidate.memorial_day # alias: memorial
Holidate.independence_day # alias: july_4
Holidate.labor_day # alias: labor
Holidate.columbus_day # alias: columbus
Holidate.veterans_day # alias: veteran
Holidate.thanksgiving_day # alias: thanksgiving
Holidate.christmas_day # alias: xmas
Also has a ::find method that allows you to find the nth day of the week in a given month and year.
Holidate.find('1st', 'Friday', 'December', '1985')
You can also find the nth to last day.
Holidate.find(:third_to_last, :wed , :oct, :'2013')
::find is case-insensitive and accepts both strings and symbols. It also accepts abbreviations for months and days of the week and allows first, second, etc. to be abbreviated as 1st, 2nd, etc. You can also give ::find integers. Day of the week and month should correspond to Date#wday and Date#month, respectively.
Holidate.find(-1, 0, 7, 1985) # == Holidate.find('last', 'Sunday', 'July', '1985')
Of course, magic numbers can make code harder to understand, so use with caution.
FAQs
Unknown package
We found that holidate 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.