JSPM

cjl_npm_tools

1.1.5
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 2
    • Score
      100M100P100Q51501F
    • License ISC

    提供了关于时间,日期方面的方法,还有像深度拷贝,封装的百度翻译,16进制颜色转换等

    Package Exports

    • cjl_npm_tools
    • cjl_npm_tools/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cjl_npm_tools) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    安装

    、、、 npm install cjl-tools

    导入

    、、、js const tools=require('cjl-tools')

    格式化时间(获取当前时间)

    const time=tools.dateFormat(new Date())

    转移html中的特殊字符

    、、、例: const html='

    给我转一下

    ' const htmlStr=tools.htmlEscape(html)

    带还原的html字符串

    const Unhtml=tools.UnhtmlEscape(htmlStr)

    灵活排序

    const list=list.tools.SotrPare('需要排序的属性名称',true) //true:升序,false:降序

    百度翻译 (e:所需要配翻译的文字,lang:语言类型 'zh':中文,'en':英文,目前只有中英互)

    js-md5(安装请求加密第三方插件),vue-jsonp (动态创建javascript插件)

    let name =await tools.MTtrans(e,lang)

    开源协议

    ISC