Avoid monkey patching the global object `JSON`
Closed this issue · 2 comments
CMCDragonkai commented
How can we use this without monkeypatching the global object?
erdtman commented
Maybe you could do like this
const canonicalize = require('canonicalize');
const json = {
"from_account": "543 232 625-3",
"to_account": "321 567 636-4",
"amount": 500,
"currency": "USD"
}
console.log(canonicalize(json));
erdtman commented
Hope this solved your issue (I updated the examples to also reflect this)