
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
dayjs-jp-era
Advanced tools
dayjsのformatにて日本の元号を表示するプラグインです。
https://github.com/hyakt/dayjs-jp-format さんをフォークしてます。
理由:平成30年のときに「平成30」、令和4年のとき「令和4年」と表記されてしまっていたため。
npm install --save dayjs-jp-format
npm install --save dayjs # peer dependency
or
yarn add dayjs-jp-format
yarn add dayjs # peer dependency
import { jpFormat } from 'dayjs-jp-era'
dayjs.extend(jpFormat) // use plugin
const date = '2020-06-24'
const result = dayjs(date).format('rrrr')
console.log(result); //-> 令和2
const result = dayjs(date).format('rrrr年')
console.log(result); //-> 令和2年
const result = dayjs(date).format('rrr')
console.log(result); //-> 令和2年
const result = dayjs(date).format('rr')
console.log(result); //-> 令和
Format | Output | Description |
---|---|---|
rrrr | 令和2 | 日付に応じた和暦(年は除く) |
rrr | 令和2年 | 年あり |
rr | 令和 | 日付に応じた元号 |
FAQs
Japanese Era format for dayjs.
The npm package dayjs-jp-era receives a total of 33 weekly downloads. As such, dayjs-jp-era popularity was classified as not popular.
We found that dayjs-jp-era 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 uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.