Skip to content

Instantly share code, notes, and snippets.

@leggsimon
Created August 26, 2018 19:05
Show Gist options
  • Save leggsimon/3a01a4798923cc335d052b1e4d2be48f to your computer and use it in GitHub Desktop.
Save leggsimon/3a01a4798923cc335d052b1e4d2be48f to your computer and use it in GitHub Desktop.
const querystring = require('querystring');
const qs = querystring.parse('doom=bar')
console.log(qs)
// console.log(`QS: ${qs}`) <-- This blows up
// console.log('QS: ' + qs) <-- So does this
qs.toString = function() {
return JSON.stringify(this)
}
console.log(qs)
console.log(`QS: ${qs}`)
console.log('QS: ' + qs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment