Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@meniga/dates
Advanced tools
Dates is a utility library for working with dates and date locales. It's basically a wrapper for moment js right now but is abstracted so that we can easily switch 3rd party libraries if we want).
Wrapper for moment(date, format, strict) or moment() if date is null
Wrapper for moment.max
Wrapper for moment.min
Wrapper for moment(date, parseFormat).format(format). If stripTime is given, the timestamp from the date object will be removed before formatting.
Wrapper for moment(date).isSame(compareDate, dateGrouping)
Wrapper for moment(date).isBefore(compareDate, dateGrouping)
Wrapper for moment(date).isAfter(compareDate, dateGrouping)
Wrapper for moment(date).isSameOrBefore(compareDate, dateGrouping)
Wrapper for moment(date).isSameOrAfter(compareDate, dateGrouping)
Wrapper for moment(date).isValid()
Removes timestamp information from the date object
Formats a weekday in the grammatically correct custom format as defined in the locale settings for moment
Returns the day difference between today and the given day
Meniga has a concept of period which is defined as:
0 = This month, [1-12] = Last X months, 'thisYear' = This year, 'lastYear' = Last year
This function gives you an object that includes the period itself, and the start and end dates for the given period. If includeCurrentMonth is true the end date will be the current month, otherwise it will be the last completed month.
Wrapper for moment.locale(locale) and moment.updateLocale(locale, config)
Wrapper for moment.weekdaysShort(day)
Wrapper for moment.weekdays(day)
Wrapper for moment.months(month)
Wrapper for moment.monthsShort(month)
Returns a locale object intended for d3 use that includes the following:
{
'periods': ['AM', 'PM'],
'days': moment.weekdays(),
'shortDays': moment.weekdaysShort(),
'months': moment.months(),
'shortMonths': moment.monthsShort(),
}
Example usage:
import { getLocaleObject } from '@meniga/dates'
import { timeFormatDefaultLocale } from 'd3-time-format'
const locale = getLocaleObject()
timeFormatDefaultLocale(locale)
FAQs
A utility package for localized date formatting
The npm package @meniga/dates receives a total of 16 weekly downloads. As such, @meniga/dates popularity was classified as not popular.
We found that @meniga/dates demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.