2.0.2 • Published 3 years ago

yt-comment-date-format v2.0.2

Weekly downloads
3
License
ISC
Repository
-
Last release
3 years ago

使用方法

安装依赖 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
2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago