• File: tostring.js
  • Full Path: /home6/laduliya/test.mydthpay.com/node_modules/jws/lib/tostring.js
  • Date Modified: 10/26/1985 11:45 AM
  • File size: 262 bytes
  • MIME-type: text/plain
  • Charset: utf-8
/*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);
};