lib/toJson.js
function cloneObj(a,b) {
  Object.keys(b).forEach(function(k) {
    a[k] = b[k];
  });
  return a;
}
function cloneObj(a,b) {
  Object.keys(b).forEach(function(k) {
    a[k] = b[k];
  });
  return a;
}
function cloneObj ( a , b ) { Object . keys ( b ) . forEach ( function ( k ) { a [ k ] = b [ k ] ; } ) ; return a ; }
PhantomJS doesn't support Object.assigns, so just implement a clone method here.
PhantomJS doesn t support Object . assigns so just implement a clone method here .