RubyLouvre/anu

View on GitHub
packages/render/miniapp/registerAPIs.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function promisefyApis has 44 lines of code (exceeds 25 allowed). Consider refactoring.
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]) {
Severity: Minor
Found in packages/render/miniapp/registerAPIs.js - About 1 hr to fix

    Function key has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                ReactWX.api[key] = function(options) { 
                    var args = [].slice.call(arguments)
                    if ( ! options || Object(options) !== options ) {
                        return needWrapper.apply(facade, args);
                    }
    Severity: Minor
    Found in packages/render/miniapp/registerAPIs.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status