@ytfee/npm-yt-comment-date-format
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

使用方法

安装依赖 npm 或 yarn

npm i --save yt-comment-date-format
# or
yarn add yt-comment-date-format

前端使用

import { commentTimeFormat } from 'yt-comment-date-format'
# timestamp 当前(系统)时间, time评论时间
commentTimeFormat(timestamp, time)

tsconfig.json 配置

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "declaration": true,
    "outDir": "dist",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true
  },
  "exclude": ["node_modules", "dist"]
}

NPM包依赖及执行命令

使用 npm 或 yarn

npm i -g typescript
npm i -g uglifyjs

typescript转es5并压缩

tsc && uglifyjs ./dist/index.js -c -m -o ./dist/index.min.js

测试

node test.js

Readme

Keywords

none

Package Sidebar

Install

npm i @ytfee/npm-yt-comment-date-format

Weekly Downloads

0

Version

2.0.2

License

ISC

Unpacked Size

5.28 kB

Total Files

8

Last publish

Collaborators

  • haizzx14
  • zhoudi
  • fooso
  • csorz