1.0.22 • Published 2 years ago

dodo-js-lib v1.0.22

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

js 常用工具函数集合

工作中使用到的 js 函数!

介绍

  1. 格式化时间:formatDatetime(time='', str='datetime')

安装

 npm i dodo-js-lib --save

使用

import * as jslib from 'dodo-js-lib' 
console.log(jslib.formatDatetime(), formatDatetime())

更新记录

1.0.1 - 2020-01-01

formatDatetime 函数

alert(lib.formatDatetime('Fri Nov 25 2022 14:54:58 GMT+0800 (中国标准时间)'))  // new Date().toString()
alert(lib.formatDatetime('2022-11-25 12:12:12'))  // format
alert(lib.formatDatetime('2022-11-25T06:52:17.041Z'))  // new Date().toJSON()
alert(lib.formatDatetime(1669359195535))  // new Date().getTime()

rewirteLog 函数

重写console方法,在生产环境中不显示调试log
在main.js中
import {rewirteLog} from './lib/utils'
rewirteLog()

1.0.18 - 2023-01-01

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.22

2 years ago

1.0.11

2 years ago

1.0.21

2 years ago

1.0.10

2 years ago

1.0.20

2 years ago

1.0.15

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago