let func = function() {};
func.name"""func"
| #!/bin/bash | |
| web_service='nginx' | |
| config_file="/usr/local/etc/le-renew-webroot.ini" | |
| le_path='/opt/letsencrypt' | |
| exp_limit=30; | |
| if [ ! -f $config_file ]; then | |
| echo "[ERROR] config file does not exist: $config_file" |
| Array.prototype.selectMany = function (fn) { | |
| return this.map(fn).reduce(function (x, y) { return x.concat(y); }, []); | |
| }; | |
| // usage | |
| console.log([[1,2,3], [4,5,6]].selectMany(function (x) { return x; })); //[1,2,3,4,5,6] | |
| console.log([{ a: [1,2,3] }, { a: [4,5,6] }].selectMany(function (x) { return x.a; })); |