# object-to-json

> Turn an object into a JSON object

Latest version **0.0.5** (published 2015-10-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install object-to-json
pnpm add object-to-json
yarn add object-to-json
bun add object-to-json
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2015-10-26 |
| First published | 2015-08-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Joe Gesualdo |
| Maintainers | joegesualdo |
| Keywords | object to json |

## Links

- npm: https://www.npmjs.com/package/object-to-json
- Repository: https://github.com/joegesualdo/object-to-json
- Homepage: https://github.com/joegesualdo/object-to-json#readme
- Issues: https://github.com/joegesualdo/object-to-json/issues
- npm.io page: https://npm.io/package/object-to-json

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.5 (latest) — 2015-10-26
- 0.0.4 — 2015-10-24
- 0.0.3 — 2015-08-27
- 0.0.2 — 2015-08-26
- 0.0.1 — 2015-08-26

## README

## objectToJSON
> Convert an object into a JSON object

## Why?
JSON.parse() didn't work for a [Bluebird](https://github.com/petkaantonov/bluebird) promise object.

## Install

```
$ npm install --save object-to-json
```
## Usage

```javascript
var objectToJson = require("object-to-json");

var person = {
  name: "Joe",
  age: 22
}

var jsonPerson = objectToJSON(person);
```
## API

### `objectToJson(object)`

| Name | Type | Description |
|------|------|-------------|
| object | `Object` | object to be converted to a JSON object 

```javascript
var objectToJson = require("object-to-json");

var person = {
  name: "Joe",
  age: 22
}

var jsonPerson = objectToJSON(person);
```

## License
MIT © Joe Gesualdo

---
_Source: https://npm.io/package/object-to-json · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
