Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
github.com/bastengao/chinese-holidays-go
提供具有中国特色的休假安排或者工作日查询。
go get github.com/bastengao/chinese-holidays-go
Bundle Query
import (
"github.com/bastengao/chinese-holidays-go/holidays"
)
queryer, err := holidays.BundleQueryer()
if err != nil {
panic(err)
}
d := time.Date(2019, 10, 1, 0, 0, 0, 0, china)
queryer.IsHoliday(d) // true
queryer.IsWorkingday(d) // false
Cache Queryer is a Queryer that fetches online data and check updates every day.
queryer, err := holidays.NewCacheQueryer()
if err != nil {
panic(err)
}
queryer.IsHoliday(d)
Multiple Queryer is a Queryer that delegates query to underlying multiple Queryers. Try each queryers in order until one returns a result.
bundleQueryer, err := holidays.BundleQueryer()
if err != nil {
panic(err)
}
cacheQueryer, err := holidays.NewCacheQueryer()
if err != nil {
panic(err)
}
queryer := holidays.NewMultipleQueryer(cacheQueryer, bundleQueryer)
queryer.IsHoliday(d)
FAQs
Unknown package
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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.