Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

JSON convenience wrapper #2

Closed
peterboyer opened this issue Nov 8, 2021 · 0 comments
Closed

JSON convenience wrapper #2

peterboyer opened this issue Nov 8, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@peterboyer
Copy link
Owner

Very commonly use JSON.parse and JSON.stringify and always need to wrap them with fromThrowable.

Ideally want to be able to:

import { JSON } from `@armix/terror/json`;

const $request = JSON.stringify(...);
const $response = JSON.parse(...);

To have access to .parse and .stringify both as fromThrowable functions, and then prototype onto the default JSON object to fallback to anything else (for better future useability).

@peterboyer peterboyer added the enhancement New feature or request label Nov 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant