index.js
function patch(node, languages) {
    var data = node.data || {};
    var primary = languages[0][0];

    data.language = primary === 'und' ? null : primary;
    data.languages = languages;

    node.data = data;
}
function patch(node, languages) {
    var data = node.data || {};
    var primary = languages[0][0];

    data.language = primary === 'und' ? null : primary;
    data.languages = languages;

    node.data = data;
}
function patch ( node , languages ) { var data = node . data || { } ; var primary = languages [ 0 ] [ 0 ] ; data . language = primary === 'und' ? null : primary ; data . languages = languages ; node . data = data ; }
Patch a `language` and `languages` properties on `node`.

@param {NLCSTNode} node - Node.
@param {Array.<Array.<string, number>>} languages - Languages.
Patch a language and languages properties on node .