JavaScript 代码片段 ( javascript.json )
{
"Print to console": {
"prefix": "cs",
"body": [
"console.log($1)"
],
"description": "打印调试日志"
},
"validate Phone": {
"prefix": "vPhone",
"body": "var reg = /^1[34578]\d{9}$/",
"description": "正则验证手机格式"
},
"validate Telephone": {
"prefix": "vTel",
"body": "var reg = /^0\d{2,3}-?\d{7,8}$/",
"description": "正则验证固定电话"
},
"validate Password": {
"prefix": "vPassword",
"body": "var reg = /(?!^(\d+|[a-zA-Z]+|[~!@#$%^&*?]+)$)^[\w~!@#$%^&*?]+$/",
"description": "正则验证密码,必须大小写英文,可带特殊字符"
}
}
less代码片段 ( less.json )
{
"Print to console": {
"prefix": "rr",
"body": [
"/@r;"
],
"description": "px to rem"
}
}
网友评论