/* eslint-disable fecs-camelcase 
Normalize watch info

@inner
@param {*} value the watch info to normalize
@return {Object}
function normalizeWatchItem(value) {
    let handlers;
    let options = {};
    let valueType = typeof value;
    if (valueType === 'function' || valueType === 'string') {
        handlers = [value];
    }
    else if (Array.isArray(value)) {
        handlers = value;
    }
    else {
        handlers = [value.handler];
        options.immediate = value.immediate;
    }

    let watchHandler = function (...args) {
        for (let i = 0, len = handlers.length; i < len; i++) {
            let item = handlers[i];
            if (typeof item === 'string') {
                item = this[item];
            }
            item.apply(this, args);
        }
    };

    return {
        handler: watchHandler,
        options
    };
}