t-comm
TypeScript icon, indicating that this package has built-in type declarations

1.5.15 • Public • Published


介绍

t-comm 是一个专业、稳定、纯粹的工具库。

如何使用

  1. 安装依赖
npm install t-comm -S
  1. 引入并使用
import { getMonthDay } from 't-comm';

getMonthDay(2022, 2)  // 28

单文件引入

对于一些不支持 tree-shaking 的项目,t-comm 提供了单文件引入的方式。

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

还可以从 es 目录中导入,适合一些不支持 CJS 的项目。

import { timeStampFormat } from 't-comm/es/time/time';

详细文档

点击这里查看

Readme

Keywords

Package Sidebar

Install

npm i t-comm

Weekly Downloads

344

Version

1.5.15

License

MIT

Unpacked Size

3.55 MB

Total Files

1872

Last publish

Collaborators

  • yanggwcn