denysdovhan / wtfjs

🤪 A list of funny and tricky JavaScript examples
http://bit.ly/wtfjavascript
Do What The F*ck You Want To Public License
34.95k stars 2.55k forks source link

JSON.stringify('str') !== 'str' #113

Closed denysdovhan closed 3 years ago

denysdovhan commented 5 years ago
JSON.strigify('production') === 'production' //> false
pinage404 commented 5 years ago

Seems normal

JSON.stringify('production') // output : "production"
// so
JSON.stringify('production') === '"production"' // true (with double quotes)

It follow the specification

JSON specification's schema for string

github-actions[bot] commented 3 years ago

:tada: This issue has been resolved in version 1.17.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: