# coercer

> Turns objects/arrays full of strings into primitive values

Latest version **1.1.2** (published 2016-04-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install coercer
pnpm add coercer
yarn add coercer
bun add coercer
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2016-04-11 |
| First published | 2014-11-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Alex Potsides |
| Maintainers | achingbrain |

## Links

- npm: https://www.npmjs.com/package/coercer
- Repository: https://github.com/achingbrain/coercer
- Homepage: https://github.com/achingbrain/coercer#readme
- Issues: https://github.com/achingbrain/coercer/issues
- npm.io page: https://npm.io/package/coercer

## Recent versions

- 1.1.2 (latest) — 2016-04-11
- 1.1.1 — 2015-10-16
- 1.1.0 — 2014-11-07
- 1.0.0 — 2014-11-07

## README

# The Coercer

Turns objects/arrays full of strings of numbers and booleans into primitives.

## Installation

```
npm install --save coercer
```

## Usage

```javascript
var coercer = require('coercer')

coerce({
  'foo': 'true',
  'bar': '5',
  'baz': 'hello',
  'qux': {
    'quux': 'eight'
   },
   'corge': ['7', '93.2', 'false'],
   'grault': true,
   'garply': false
  })

// returns
{
  'foo': true,
  'bar': 5,
  'baz': 'hello',
  'qux': {
    'quux': 'eight'
  },
  'corge': [7, 93.2, false],
  'grault': true,
  'garply': false
}
```

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