三味的小站

js forEach中的continue,break

Lodash 中的 forEach 函数 var array = ["a", "b", "c", "d"]; _.forEach(array, function (item) { if (item == "a") { return true; // continue

三味线 Published on 2020-03-27

js中写文件到远程共享文件夹(SmbFile|net use|mount.cifs)

重构代码时遇到的问题,原Java代码用的SmbFile及相关库,现在要改在js中实现; 1. Windows下可以使用net use命令 net use <local_dir> <remote_dir> <password> /user:<username> net use Z: \\10.3.3

三味线 Published on 2020-02-09

js 字符串作为函数运行

1. new Function var test = new Function("(function(){console.log('hello!')})()"); 会在外面再包一层函数,获取不到返回值: 2. eval var test = eval("(

三味线 Published on 2019-08-05