naver / egjs

Javascript components group that brings easiest and fastest way to build a web application in your way.
https://naver.github.io/egjs
Other
935 stars 80 forks source link

Make improvement to isNeeded method #420

Closed happyhj closed 7 years ago

happyhj commented 7 years ago

Issue

382

387

Details

Preferred reviewers

@netil @jongmoon

netil commented 7 years ago

Also, I want point out for the duplicated items showing on API doc. image

It happens because of these comments:

/**
    * Stores the current state of the web page in a default key using JSON.
    * @method jQuery.persist

/**
    * Return stored state in global namespace as object
    * @method jQuery.persist

/**
    * Stores the current state of the web page using JSON.
    * @method jQuery.persist

Those can be described as one using JSDoc's optional param syntax.

/**
    * Get or store current state of the page context
    * @method jQuery.persist
        * @param {String} [key] The key of the state information to be stored
        * @param {Object} [state] The value to be stored in a given key
        * @example
        *    // example1 when only 'key' is given
        * @example
        *    // example2 when 'key' and 'value' are given
         ...