json-prototypes
v0.0.1
Published
```typescript import 'json-prototypes'
Downloads
4
Readme
json-prototypes
import 'json-prototypes'
const data = { info: true, result: '0x123d' }
const jsonString = JSON.stringify(data)
if (jsonString.isValidJSON()) {
const parsed = jsonString.parseJSON<typeof data>(console.error)
console.log(parsed)
}
const beauty = jsonString.formatJSON()
console.log(beauty)
console.log(beauty.toSha256Hex())