1.0.0 • Published 2 years ago

yida-utils v1.0.0

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

作用

求数组最大值,最小值,打印数组,日期格式化为字符串

安装

npm install yida-utils

使用演示

const yida = require("./index.js");

let arr = [12, 35, 7, 90, 1, 23, 600, -10];

//获取数组最大值
const maxVal = yida.maxValue(arr);
console.log(maxVal);

//获取数组最小值
const minVal = yida.minValue(arr);
console.log(minVal);

//打印数组
yida.print(arr);

//日期格式化为日期字符串
const str = yida.format(new Date());
console.log(str);

开源协议

ISC