demo/editor/kissy.js
function (o) {
            if (o == null) {
                return [];
            }
            if (S.isArray(o)) {
                return o;
            }
            var lengthType = typeof o.length,
                oType = typeof o;
            // The strings and functions also have 'length'
            if (lengthType != 'number' ||
                // form.elements in ie78 has nodeName 'form'
                // then caution select
                // o.nodeName
                // window
                o.alert ||
                oType == 'string' ||
                // https://github.com/ariya/phantomjs/issues/11478
                (oType == 'function' && !( 'item' in o && lengthType == 'number'))) {
                return [o];
            }
            var ret = [];
            for (var i = 0, l = o.length; i < l; i++) {
                ret[i] = o[i];
            }
            return ret;
        }
function (o) {
            if (o == null) {
                return [];
            }
            if (S.isArray(o)) {
                return o;
            }
            var lengthType = typeof o.length,
                oType = typeof o;
            // The strings and functions also have 'length'
            if (lengthType != 'number' ||
                // form.elements in ie78 has nodeName 'form'
                // then caution select
                // o.nodeName
                // window
                o.alert ||
                oType == 'string' ||
                // https://github.com/ariya/phantomjs/issues/11478
                (oType == 'function' && !( 'item' in o && lengthType == 'number'))) {
                return [o];
            }
            var ret = [];
            for (var i = 0, l = o.length; i < l; i++) {
                ret[i] = o[i];
            }
            return ret;
        }
function ( o ) { if ( o == null ) { return [ ] ; } if ( S . isArray ( o ) ) { return o ; } var lengthType = typeof o . length , oType = typeof o ; // The strings and functions also have 'length' if ( lengthType != 'number' || // form.elements in ie78 has nodeName 'form' // then caution select // o.nodeName // window o . alert || oType == 'string' || // https://github.com/ariya/phantomjs/issues/11478 ( oType == 'function' && ! ( 'item' in o && lengthType == 'number' ) ) ) { return [ o ] ; } var ret = [ ] ; for ( var i = 0 , l = o . length ; i < l ; i ++ ) { ret [ i ] = o [ i ] ; } return ret ; }
Converts object to a TRUE array.
@param o {object|Array} array like object or array
@return {Array} native Array
@member KISSY
Converts object to a TRUE array .