Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/novlan1/t-comm
丰富易用的工具库
https://github.com/novlan1/t-comm
common light-tools t-comm utils
Last synced: 19 days ago
JSON representation
丰富易用的工具库
- Host: GitHub
- URL: https://github.com/novlan1/t-comm
- Owner: novlan1
- License: mit
- Created: 2022-03-17T02:56:12.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-19T03:01:54.000Z (7 months ago)
- Last Synced: 2024-04-20T03:05:21.503Z (7 months ago)
- Topics: common, light-tools, t-comm, utils
- Language: TypeScript
- Homepage: https://novlan1.github.io/t-comm/
- Size: 6.22 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
---
### 介绍
`t-comm` 是一个丰富、易用的工具库。
### 如何使用
1. 安装依赖
```bash
npm install t-comm -S
```2. 引入并使用
```ts
import { getMonthDay } from 't-comm';getMonthDay(2022, 2) // 28
```### 单文件引入
对于一些不支持 `tree-shaking` 的项目,`t-comm` 提供了单文件引入的方式。
```ts
import { timeStampFormat } from 't-comm/lib/time/time';const stamp = new Date('2020-11-27 8:23:24').getTime();
timeStampFormat(stamp, 'yyyy-MM-dd hh:mm:ss');
// 2020-11-27 08:23:24
```### 详细文档
点击[这里查看](https://novlan1.github.io/t-comm/)。