function keys(arg) {
        var result = createSequence();

        if (Array.isArray(arg)) {
            // merge the keys of all of the items in the array
            var merge = {};
            arg.forEach(function (item) {
                var allkeys = keys(item);
                allkeys.forEach(function (key) {
                    merge[key] = true;
                });
            });
            result = keys(merge);
        } else if (arg !== null && typeof arg === 'object' && !isFunction(arg)) {
            Object.keys(arg).forEach(key => result.push(key));
        }
        return result;
    }
Return keys for an object
@param {Object} arg - Object
@returns {Array} Array of keys