all files / dom/val/ getDuplexType.js

100% Statements 5/5
100% Branches 4/4
100% Functions 1/1
100% Lines 5/5
1 2 3 4 5 6 7 8 9  23× 23×   14×    
import { rcheckedType } from '../rcheckedType'
export function getDuplexType(elem) {
    var ret = elem.tagName.toLowerCase()
    if (ret === 'input') {
        return rcheckedType.test(elem.type) ? 'checked' : elem.type
    }
    return ret
}