# string-converter

> Converts strings to other javascript types

Latest version **1.3.5** (published 2023-06-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install string-converter
pnpm add string-converter
yarn add string-converter
bun add string-converter
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.5 |
| Published | 2023-06-19 |
| First published | 2019-11-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 13.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | jaspenlind |
| Maintainers | jaspenlind |
| Keywords | javascript, type, convert, parse |

## Links

- npm: https://www.npmjs.com/package/string-converter
- Repository: https://github.com/jaspenlind/string-converter
- Homepage: https://github.com/jaspenlind/string-converter#readme
- Issues: https://github.com/jaspenlind/string-converter/issues
- npm.io page: https://npm.io/package/string-converter

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.5.3

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.3.5 (latest) — 2023-06-19
- 1.3.4 — 2022-04-11
- 1.3.3 — 2021-09-22
- 1.3.2 — 2021-09-21
- 1.2.1 — 2020-08-26
- 1.2.0 — 2020-06-11
- 1.1.0 — 2020-03-15
- 1.0.0 — 2019-11-02

## README

# string-converter

Converts strings to other javascript types

[![Build Status](https://travis-ci.com/jaspenlind/string-converter.svg?branch=master)](https://travis-ci.com/jaspenlind/string-converter)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ba5869054b6846d293e22022020c8b98)](https://www.codacy.com/gh/jaspenlind/string-converter/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=jaspenlind/string-converter&amp;utm_campaign=Badge_Grade)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Coverage Status](https://coveralls.io/repos/jaspenlind/string-converter/badge.svg?branch=master)](https://coveralls.io/r/jaspenlind/string-converter?branch=master)
![David](https://img.shields.io/david/jaspenlind/string-converter)
![GitHub](https://img.shields.io/github/license/jaspenlind/string-converter)
[![npm](https://img.shields.io/npm/v/string-converter)](https://www.npmjs.com/package/string-converter)

## Installation

```shell
npm install string-converter
```

## Usage

```js
import { convert } from "string-converter";

const numericValue = convert("42");
==> 42

const booleanValue = convert("1");
==> true

const stringValue = convert("some string");
==> "some string"

const objectWithValue = {
  value: 42,
  toString: () => value.toString()
};
const stringValue = convert(objectWithValue);
==> "42";
```

## Docs

<https://jaspenlind.github.io/string-converter>

## Test

```shell
npm test
```

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