Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
timezone-groups
Advanced tools
Readme
timezone-groups
is a versatile NPM package that allows you to effortlessly generate timezone groups in both Node.js and browser environments. It supports multiple date libraries, including the option to create and use custom ones.
Install the package via NPM using the following command:
npm install timezone-groups
To generate timezone groups using the CLI, use the following command:
timezone-groups --start "2023-07-26" --days 1 --engine moment
Options:
--start
: The start reference date to generate the groups (defaults to now).--days
: The number of days to consider for the DST groupings (defaults to 365).--engine
: The date library to use for generating groups. Options include "moment", "luxon", "date-fns", "dayjs", "native" (defaults to moment).The output will be a file named timezone-groups_<engine>_timestamp.json
, which contains an array of objects with the following structure:
{
"labelTzIndices": [0, ..., 46],
"tzs": ["America/Anguilla", ..., "America/Tortola"]
}
You can also use the package programmatically in your JavaScript code. Here's an example of how to do it:
const timeZoneGroups = await groupTimeZones({
startDate, // The start reference date to generate the groups (defaults to now).
groupDateRange, // The number of days to consider for the DST groupings (defaults to 365).
dateEngine, // The date engine instance used to generate groups. You can use the `createDateEngine` utility to create an engine from any of the supported engine values. Alternatively, a custom date engine instance used to generate groups.
});
Intl.supportedValuesOf("timeZone")
.FAQs
A JavaScript library to group time zones based on dates (DST-aware).
We found that timezone-groups demonstrated a healthy version release cadence and project activity because the last version was released less than 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.