
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@date/independence-day
Advanced tools
Create Independence Day Date by year or test if a Date is Independence Day.
Use with @date/holidays, create Independence Day Date by year, or test if a Date is Independence Day.
Has default info for holiday which can be overridden when loading it into a @date/holidays.
npm install --save @date/independence-day
// 1. use package directly
const holiday = require('@date/independence-day')
// the `gen` function creates a Date by year.
const date = holiday.gen(2001)
// the `is` function tests if a Date is the holiday.
const result = holiday.is(new Date(2001, 2, 3))
if (result) {
// truthy value means it is a holiday.
}
// the actual returned value is a number between 0 and 3.
// 0 - not a holiday
// 1 - is a holiday on its main date in a year without an observed date.
// 2 - is a holiday on an observed date.
// 3 - is a holiday on its main date in a year with an observed date.
// 2. load into a @date/holidays instance:
// create a Holidays instance:
const holidays = require('@date/holidays')()
// load holiday into the Holidays instance:
// 1. without options overrides
holidays.load('@date/independence-day')
// 2. with options overrides:
holidays.load('@date/independence-day', {
// optional override options here.
})
holidays.isHoliday(date) // true
holidays.isHoliday(new Date(2001, 0, 0)) // false
holidays.getHoliday(date) // array with info
holidays.getHoliday(new Date(2001, 0, 1)) // returns empty array
FAQs
Create Independence Day Date by year or test if a Date is Independence Day.
We found that @date/independence-day 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.