packages/render/miniapp/registerAPIs.js
Function promisefyApis
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function promisefyApis(ReactWX, facade, more) {
const weApis = Object.assign({}, onAndSyncApis, noPromiseApis, otherApis, more);
Object.keys(weApis).forEach(key => {
var needWrapper = more[key] || facade[key] || noop;
if (!onAndSyncApis[key] && !noPromiseApis[key]) {
Function key
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ReactWX.api[key] = function(options) {
var args = [].slice.call(arguments)
if ( ! options || Object(options) !== options ) {
return needWrapper.apply(facade, args);
}