ChainAgnostic / caip-js

CAIP standard utils
https://www.npmjs.com/package/caip
MIT License
25 stars 10 forks source link

feat: rename `toJson` to `toJSON` #15

Closed raymondfeng closed 2 years ago

raymondfeng commented 3 years ago

This PR is to make CAIP objects compatiable with JSON.stringify that honors toJSON. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description

Signed-off-by: Raymond Feng enjoyjava@gmail.com

pedrouid commented 2 years ago

This would be a breaking API change... it would need some consideration from existing consumers

ukstv commented 2 years ago

Apparently, Ceramic does not use toJson, so we should not be affected by this change.

pedrouid commented 2 years ago

Great! In that case I will publish a beta release (1.1.0-beta.1) with this change as well