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.
This is a holiday generator with heavy inspiration from holidayapi.com (https://github.com/joshtronic/holidayapi.com)
var holidayjs = require('holidayjs')('<path to your data files>')
holidayjs.calculateHolidays('ca', 2015, function(err, holidays) {
//do stuff with the holidays
})
[{
name: 'Halloween',
date: '2015-10-31'
},{
name: 'Christmas',
date: '2015-12-25'
}, ...]
[{
name: '<some name>',
rule: {
override: '', //use if you have a specific date in mind, ie. 'January 1'
generator: {
special: '', //use to base date relatively off a special date. accepted values are %EASTER
day: {
day: '', //use to specify day of the week, ie. 'Monday'
placement: 1 //use to relatively choose the day of the week. possible values are -1, -2, -3, -4, 1, 2, 3, 4
},
month: 'september', //use to specify month, ie. 'September'
modifier: '+3 days' //use to offset the date by some amount
},
ifWeekend: { //if the date eventually lands on a weekend...
pushTo: 'Monday' //push it to the specified day here
}
}
}
}, {}, ...]
module.exports = [
{
name: 'New Year\'s Day',
rule: {
override: 'January 1'
}
}, {
name: 'Family Day',
rule: {
generator: {
day: {
day: 'Monday',
placement: 3
},
month: 'February'
}
}
}, {
name: 'Good Friday',
rule: {
generator: {
special: '%EASTER',
modifier: '-2 days'
}
}
}, {
name: 'Victoria Day',
rule: {
generator: {
day: {
day: 'Monday',
placement: 3
},
month: 'May'
}
}
}, {
name: 'Canada Day',
rule: {
override: 'July 1'
}
}, {
name: 'Labor Day',
rule: {
generator: {
day: {
day: 'Monday',
placement: 1
},
month: 'September'
}
}
}, {
name: 'Thanksgiving',
rule: {
generator: {
day: {
day: 'Monday',
placement: 2
},
month: 'October'
}
}
}, {
name: 'Remembrance Day',
rule: {
generator: {
day: {
day: 'Monday',
placement: 2
},
month: 'October'
}
}
}, {
name: 'Christmas',
rule: {
override: 'December 25'
}
}
]
FAQs
Holiday generator
The npm package holidayjs receives a total of 18 weekly downloads. As such, holidayjs popularity was classified as not popular.
We found that holidayjs 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.