Georg Reisinger b171f1646c GoogleOauth2.0 First implementation
First try for GoogleOauth2.0
2018-10-26 14:02:15 +02:00

11 lines
262 B
JavaScript

/*global module*/
var Buffer = require('buffer').Buffer;
module.exports = function toString(obj) {
if (typeof obj === 'string')
return obj;
if (typeof obj === 'number' || Buffer.isBuffer(obj))
return obj.toString();
return JSON.stringify(obj);
};