diff options
Diffstat (limited to 'backend/node_modules/jws/lib/tostring.js')
-rw-r--r-- | backend/node_modules/jws/lib/tostring.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/backend/node_modules/jws/lib/tostring.js b/backend/node_modules/jws/lib/tostring.js new file mode 100644 index 0000000..f5a49a3 --- /dev/null +++ b/backend/node_modules/jws/lib/tostring.js @@ -0,0 +1,10 @@ +/*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); +}; |