function isEmptyFunction(fun){
let reg = /^function\s*[\w\$]*\s*\([\s\w\$,=]*\)\s*\{\s*\}\s*$/;
return typeof fun === 'function' && reg.test(fun.toString());
}
// 支持以下空函数
// 1、
isEmptyFunction(function(){});
// 2、
isEmptyFunction(function ( a,b,c) { });
// 3、
isEmptyFunction(function ( a,b = 3,c) { });
// 4、
isEmptyFunction(function funName(){});
// 5、
isEmptyFunction(function f2A3u23nNa$$_me222 ( ) { });
微信小程序中如果开启增强编译则不支持第三种方法的判断