
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
calendar-view-utils
Advanced tools
Utilities for building calendar views.
Date
objects, no library required.npm install calendar-view-utils --save
import { CalendarMonth } from 'calendar-view-utils';
const date = new Date(2021, 0, 1);
const view = new CalendarMonth(date);
console.log(view);
CalendarMonth
Create a CalendarMonth
for the target date
. A CalendarMonth
contains all the needed information
for building a standard month view.
new CalendarMonth(date);
Property | Description | Type |
---|---|---|
year | Year value | number |
month | Month value | number |
weeks | Collection of weeks with the month | CalendarWeek[] |
CalendarWeek
Create a CalendarWeek
for the target date
. A CalendarWeek
contains all the needed information
for building a standard week view.
new CalendarWeek(date);
Property | Description | Type |
---|---|---|
isoWeek | ISO week value | number |
days | Collection of days within the week | CalendarDay[] |
CalendarDay
Create a CalendarDay
for the target date
.
new CalendarDay(date);
Property | Description | Type |
---|---|---|
isoString | ISO string value (date) | string |
day | Day of month value | number |
month | Month value | number |
year | Year value | number |
isToday | Indicates if the day is today. | boolean |
isPast | Indicates if the day is before today | boolean |
isFuture | Indicates if the day is after today | boolean |
import { DayOfWeek } from 'calendar-view-utils';
const options = {
weekStartsOn: DayOfWeek.Monday,
};
const view = new CalendarWeek(date, options);
Property | Description | Type | Default |
---|---|---|---|
weekStartsOn | Which day the week starts on | DayOfWeek | Sunday |
import { DayOfWeek, getWeekDays } from 'calendar-view-utils';
const example1 = getWeekDays();
// => [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]
const example2 = getWeekDays(DayOfWeek.Monday);
// => [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]
npm install
npm run build
FAQs
Utilities for generating calendar views.
The npm package calendar-view-utils receives a total of 0 weekly downloads. As such, calendar-view-utils popularity was classified as not popular.
We found that calendar-view-utils 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.