Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/develephant/jsonp

A promise based JSON wrapper.
https://github.com/develephant/jsonp

async es2017 json promise

Last synced: 11 days ago
JSON representation

A promise based JSON wrapper.

Awesome Lists containing this project

README

        

# `jsonp`

### A promise based JSON wrapper.

## Install

```
npm i @develephant/jsonp --save
```

## Usage

```js
const jsonp = require('@develephant/jsonp')
```

## Example

_async_

```js
async function doJSONStuff() {
let json_str = await jsonp.stringify(js_obj)
}
```

_promise_

```js
jsonp.parse(json_str)
.then(res => console.log(res))
.catch(err => console.error(err))
```

## Methods

- `stringify`

- `pretty` (formatted stringify)

- `parse`

---

#### `jsonp` ⋆ © 2017 develephant ⋆ MIT license