JSPM

tocamelcase-sumarray-package

1.1.3
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 1
    • Score
      100M100P100Q36819F
    • License ISC

    tocamelcase sum

    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');//输出对应的格式