Skip to content

Commit

Permalink
Update stringify.js
Browse files Browse the repository at this point in the history
with Buffer formatter
  • Loading branch information
codemeasandwich authored Nov 10, 2022
1 parent 892dc5c commit da2f09b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/stringify.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ module.exports = function stringify(input, options, pad) {
if (input instanceof Date) {
return `Date(${input.toJSON()})`;
}

if( Buffer.isBuffer(input)){
return `Buffer[ ${Array.from(input).join()} ]`;
}
if (Array.isArray(input) || input instanceof Set) {
let typeOfObj = ""
if(input instanceof Set){
Expand Down

0 comments on commit da2f09b

Please sign in to comment.