摘要: 通过正则表达式: let trim = function(string) { return string.replace(/(^\s*)|(\s*$)/g, ""); } 可将该方法加入String属性中: String.prototype.trim=function(){ return this. 阅读全文
posted @ 2019-04-28 17:42 Mr_Kahn 阅读(202) 评论(0) 推荐(0)
摘要: 工程文件夹通过复制黏贴到另外一个地方,运行后报错 “can`t find module 某某某”,查看原因: 输入node 进入控制台,输入console.log(module.paths)查看当前nodejs查找module的路径,如果没有工程里的node_modules,通过module.pat 阅读全文
posted @ 2019-04-28 17:37 Mr_Kahn 阅读(1285) 评论(0) 推荐(0)