rem: picker.appendFilter(typeList[i], typeList[i]); 
add: if ((typeof typeList[i] == "object") && isinstance(typeList[i], Array)) picker.appendFilter(typeList[i][0], typeList[i][1]); else picker.appendFilter(typeList[i], typeList[i]); 
context: function futils_nosepicker(initialPath, typeList, attribs){    const classes = Components.classes;    const interfaces = Components.interfaces;    const PICKER_CTRID = "@mozilla.org/filepicker;1";    const LOCALFILE_CTRID = "@mozilla.org/file/local;1";    const nsIFilePicker = interfaces.nsIFilePicker;    const nsILocalFile = interfaces.nsILocalFile;    var picker = classes[PICKER_CTRID].createInstance(nsIFilePicker);    if (typeof attribs == "object")    {        for (var a in attribs)            picker[a] = attribs[a];    }    else        throw "bad type for param |attribs|";    if (initialPath)    {        var localFile;        if (typeof initialPath == "string")        {            localFile =                classes[LOCALFILE_CTRID].createInstance(nsILocalFile);            localFile.initWithPath(initialPath);        }        else        {            if (!(initialPath instanceof nsILocalFile))                throw "bad type for argument |initialPath|";            localFile = initialPath;        }        picker.displayDirectory = localFile    }    var allIncluded = false;    if (typeof typeList == "string")        typeList = typeList.split(" ");    if (typeList instanceof Array)    {        for (var i in typeList)        {            switch (typeList[i])            {                case "$all":                    allIncluded = true;                    picker.appendFilters(FILTER_ALL);                    break;                case "$html":                    picker.appendFilters(FILTER_HTML);                    break;                case "$text":                    picker.appendFilters(FILTER_TEXT);                    break;                case "$images":                    picker.appendFilters(FILTER_IMAGES);                    break;                case "$xml":                    picker.appendFilters(FILTER_XML);                    break;                case "$xul":                    picker.appendFilters(FILTER_XUL);                    break;                default:                    picker.appendFilter(typeList[i], typeList[i]);                    break;            }        }    }    if (!allIncluded)        picker.appendFilters(FILTER_ALL);    return picker;}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/ad95c9cfa0a5eeea8ef631fa77775abd9dfafc18/file-utils.js/buggy/extensions/irc/js/lib/file-utils.js