1.0.0 • Published 2 years ago
yida-xin v1.0.0
作用
求数组最大值,最小值,打印数组,日期格式化为字符串
安装
npm install yida-utils
const yida = require('./index.js')
var srr = [34, 67, 34, 77, 99]
//获取数组最大值
const maxVal = yida.maxValue(srr)
console.log(maxVal)//99
//获取数组最小值
const manVal = yida.minValue(srr)
console.log(manVal)//34
//打印数组没有返回值
yida.print(srr) //34, 67, 34, 77, 99
//获取格式化为日期格式
const str = yida.format(new Date())
console.log(str) //2022-5-13 16:54:33
开源协议
ISC
1.0.0
2 years ago