index.js
function toArray(obj) {
    var key, val, arr = [];
    for (key in obj) {
        val = obj[key];
        if (Array.isArray(val))
            for (var i = 0; i < val.length; i++)
        arr.push([ key, val[i] ]);
        else
            arr.push([ key, val ]);
    }
    return arr;
}
function toArray(obj) {
    var key, val, arr = [];
    for (key in obj) {
        val = obj[key];
        if (Array.isArray(val))
            for (var i = 0; i < val.length; i++)
        arr.push([ key, val[i] ]);
        else
            arr.push([ key, val ]);
    }
    return arr;
}
function toArray ( obj ) { var key , val , arr = [ ] ; for ( key in obj ) { val = obj [ key ] ; if ( Array . isArray ( val ) ) for ( var i = 0 ; i < val . length ; i ++ ) arr . push ( [ key , val [ i ] ] ) ; else arr . push ( [ key , val ] ) ; } return arr ; }
Maps object to bi-dimensional array  @example toArray({ foo: 'A', bar: [ 'b', 'B' ]}) will be [ ['foo', 'A'], ['bar', 'b'], ['bar', 'B'] ]
Maps object to bi - dimensional array