dayjs-plugin-inspect
v1.0.3
Published
Day.js 外掛,自訂 console.log 檢視輸出格式為 'Dayjs<ISO格式>' (Day.js plugin for custom console.log inspect output format as 'Dayjs<ISO format>')
Maintainers
Readme
dayjs-plugin-inspect
Day.js 外掛,自訂 console.log 檢視輸出格式為 'Dayjs<ISO格式>' (Day.js plugin for custom console.log inspect output format as 'Dayjs')
安裝 (Installation)
# 使用 yarn / Using yarn
yarn add dayjs-plugin-inspect
# 使用 yarn-tool / Using yarn-tool
yarn-tool add dayjs-plugin-inspect
# yt 是 yarn-tool 的別名 / yt is an alias for yarn-tool
yt add dayjs-plugin-inspect
# 使用 pnpm / Using pnpm
pnpm add dayjs-plugin-inspect
# 使用 npm / Using npm
npm install dayjs-plugin-inspect功能 (Features)
- 自訂 console.log 輸出格式為
Dayjs<2023-03-31T04:00:00.000Z> - Custom console.log output format as
Dayjs<2023-03-31T04:00:00.000Z>
使用方式 (Usage)
import dayjs from 'dayjs';
import dayjsInspectPlugin from 'dayjs-plugin-inspect';
// 安裝外掛 / Install plugin
dayjs.extend(dayjsInspectPlugin);
// 現在 console.log 會顯示自訂格式 / Now console.log will show custom format
console.log(dayjs('2023-03-31'));
// 輸出: Dayjs<2023-03-31T00:00:00.000Z>