设置跨域canvas图片,微信头像直接用base64
|
|
微信动态修改title
|
|
摇一摇
|
|
摇一摇音效播放
|
|
计算rem
|
|
禁止连续点击
|
|
node删除文件
遍历文件
12345678910111213141516//遍历文件const deleteFolder = function(path) { let files = [] if(fs.existsSync(path)) { files = fs.readdirSync(path) files.forEach(function(file,index){ let curPath = path + "/" + file if(fs.statSync(curPath).isDirectory()) { // recurse deleteFolder(curPath) } else { // delete file fs.unlinkSync(curPath) } }); fs.rmdirSync(path) }}
执行系统命令
1234var exec = require('child_process').exec,child;child = exec('rm -rf test',function(err,out) { console.log(out); err && console.log(err);});
深拷贝
|
|