https://github.com/guseyn/cutie-json
Cutie extension for JSON in js.
https://github.com/guseyn/cutie-json
Last synced: 9 days ago
JSON representation
Cutie extension for JSON in js.
- Host: GitHub
- URL: https://github.com/guseyn/cutie-json
- Owner: Guseyn
- License: mit
- Created: 2018-10-04T14:51:52.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-11T05:59:25.000Z (about 7 years ago)
- Last Synced: 2025-08-20T03:21:35.545Z (11 months ago)
- Language: JavaScript
- Size: 89.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cutie-json
[](https://npmjs.org/package/@cuties/json)
[](https://travis-ci.org/Guseyn/cutie-json)
[](https://codecov.io/gh/Guseyn/cutie-json)
[Cutie](https://github.com/Guseyn/cutie) extension for JSON in js. It's based on the [Async Tree Pattern](https://github.com/Guseyn/async-tree-patern/blob/master/Async_Tree_Patern.pdf).
## Examples
You can find examples of using this library in the [test directory](https://github.com/Guseyn/cutie-json/tree/master/test).
## Install
`npm install @cuties/json`
## Run test
`npm test`
## Run build
`npm run build`
## Usage
```js
const {
// Here needed async objects from the table below
} = require('@cuties/json');
```
For more information about parameters in the async objects visit [docs](https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/JSON).
| Async Object | Async/sync call | Parameters(default value/description) | Representation result |
| ------------- | ----------------| ---------- | --------------------- |
| `ParsedJSON` | `JSON.parse` | `string` | `json` |
| `PrettyStringifiedJSON` | sync call from `json-stringify-pretty-compact` module | `json` | `string` |
| `StringifiedJSON` | `JSON.stringify` | `json` | `string` |
| `Value` | `eval('json' + '.' + path)` | `json, path` | `value` |