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