RubyLouvre/anu

View on GitHub
lib/onlyChild.js

Summary

Maintainability
A
0 mins
Test Coverage
function onlyChild(children) {
    var el = children && children.slice && children.slice(0,1) || null;
    if (el && el.vtype) {
        return el
    }
    return el
}

module.exports = onlyChild;