Package Exports
- tocamelcase-sumarray-package
Readme
这是一个函数包,有字符串转为驼峰命名法,数组求和,日期格式化功能。
安装
通过 npm 安装:
npm install tocamelcase-sumarray-package使用方法
commonjs模块
const { toCamelCase,sumArray,formatDate } = require('tocamelcase-sumarray-package');
console.log(toCamelCase('hello-world')) //输出helloWorld
console.log(sumArray([1, 2, 3, 4])) //10
formatDate(new Date(), 'YYYY-MM');
formatDate(nonew Date()w, 'YYYY-MM-DD HH:mm:ss day, month');es模块
import { toCamelCase } from 'tocamelcase-sumarray-package';
console.log(toCamelCase('hello-world')) //输出helloWorld
console.log(sumArray([1, 2, 3, 4])) //10
formatDate(nonew Date()w, 'YYYY-MM-DD HH:mm:ss day, month');//输出对应的格式