1.2.0 • Published 6 years ago

web-xiu v1.2.0

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

web-xiu 工具函数

good good study, day day up! npm.io

效果预览

👉预览地址:请点我!在线预览

npm.io

工具类别

金额类验证 + 用户信息验证 + 邮箱联系方式验证 ...

工具描述

  • 金额类验证
  • 用户信息验证
  • 邮箱联系方式验证
  • 字符串处理
  • 数组结构
  • 对象解构
  • 循环

具体功能实现

代码片段

 function html_encode(str) {
     var s = '';
     if (str.length == 0) return "";
     s = str.replace(/&/g, "&");
     s = s.replace(/</g, "&lt;");
     s = s.replace(/>/g, "&gt;");
     s = s.replace(/\s/g, "&nbsp;");
     s = s.replace(/\'/g, "&#39;");
     s = s.replace(/\"/g, "&quot;");
     s = s.replace(/\n/g, "<br/>");
     return s;
 }

Install

# install dependencies
npm i web-xiu --save

# use dependencies
let webXiu = require("web-xiu")
webxiu.formatDouble(30,2)

For detailed explanation on how things work, checkout the contact me and docs for vue ,docs for ES6.

1.2.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago