0.1.7 • Published 6 months ago
@anlib/utils v0.1.7
an 的常用函数库
buildDate: 构建日期version: 构建版本camelize: 驼峰命名转换capitalize: 首字母大写snakeCase: 蛇形命名转换dislodgeDouble: 去除JSON数据的key的双引号sleep: 在async环境下的休眠函数debounce: 防抖throttle: 节流cached: 缓存纯函数compose: 组合函数getType: 通用判断类型getDate: 获取日期getDirname: 获取__dirnamegetFilename: 获取__filenamefileReaderFile: 文件读取execShell: 执行shell命令genExcel: 生成excelparseExcelToJson: 解析excel文件或excel文件地址为jsonwriteFile: 文件写入
// commonjs
const utils = require("@anlib/utils");
// esmodule
import * as utils from "@anlib/utils";
// browser umd
import "@anlib/utils/lib/bundle.browser.js";
console.log(anUtils);