mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-09 08:55:04 +02:00
Remove jsonwebtoken dependency
This commit is contained in:
parent
b61ecefce4
commit
954cf3e14e
29 changed files with 2130 additions and 93 deletions
10
server/libs/jws/lib/tostring.js
Normal file
10
server/libs/jws/lib/tostring.js
Normal file
|
@ -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);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue