# can-string-to-any

> Convert strings to equivalent JavaScript values

Latest version **1.2.1** (published 2019-05-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install can-string-to-any
pnpm add can-string-to-any
yarn add can-string-to-any
bun add can-string-to-any
```

## 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.2.1 |
| Published | 2019-05-27 |
| First published | 2018-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | DoneJS Core Team |
| Maintainers | cherif_b, justinbmeyer, stin13 |
| Keywords | canjs, donejs-plugin |

## Links

- npm: https://www.npmjs.com/package/can-string-to-any
- Repository: https://github.com/canjs/can-string-to-any
- Homepage: http://canjs.com
- Issues: https://github.com/canjs/can-string-to-any/issues
- npm.io page: https://npm.io/package/can-string-to-any

## Recent versions

- 1.2.1 (latest) — 2019-05-27
- 1.2.0 — 2018-07-10
- 1.0.3 — 2018-06-27
- 1.0.1 — 2018-04-15
- 1.0.0 — 2018-04-14
- 0.1.0 — 2018-04-14

## README

# can-string-to-any

[![Join our Slack](https://img.shields.io/badge/slack-join%20chat-611f69.svg)](https://www.bitovi.com/community/slack?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join our Discourse](https://img.shields.io/discourse/https/forums.bitovi.com/posts.svg)](https://forums.bitovi.com/?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/canjs/can-string-to-any/blob/master/LICENSE)
[![npm version](https://badge.fury.io/js/can-string-to-any.svg)](https://www.npmjs.com/package/can-string-to-any)
[![Travis build status](https://travis-ci.org/canjs/can-string-to-any.svg?branch=master)](https://travis-ci.org/canjs/can-string-to-any)
[![Greenkeeper badge](https://badges.greenkeeper.io/canjs/can-string-to-any.svg)](https://greenkeeper.io/)

Convert strings to equivalent JavaScript values. Works in NodeJS and in all browsers.

## Use

```js
import stringToAny from 'can-string-to-any';

stringToAny("null")  //-> null
stringToAny("-3")     //-> -3
stringToAny("false") //-> false
stringToAny("NaN")   //-> NaN
```

### Standalone use

Load the `global` version of the plugin:

```html
<script src='./node_modules/can-string-to-any/dist/global/can-string-to-any.js'></script>
```

## Documentation

Read the [can-string-to-any API docs on CanJS.com](https://canjs.com/doc/can-string-to-any.html).

## Changelog

See the [latest releases on GitHub](https://github.com/canjs/can-string-to-any/releases).

## Contributing

The [contribution guide](https://github.com/canjs/can-string-to-any/blob/master/CONTRIBUTING.md) has information on getting help, reporting bugs, developing locally, and more.

## License

[MIT](https://github.com/canjs/can-string-to-any/blob/master/LICENSE)

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