can-string-to-any

1.2.1 • Public • Published

can-string-to-any

Join our Slack Join our Discourse License: MIT npm version Travis build status Greenkeeper badge

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

Use

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:

<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.

Changelog

See the latest releases on GitHub.

Contributing

The contribution guide has information on getting help, reporting bugs, developing locally, and more.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i can-string-to-any

Homepage

canjs.com

Weekly Downloads

193

Version

1.2.1

License

MIT

Unpacked Size

17.4 kB

Total Files

16

Last publish

Collaborators

  • cherif_b
  • justinbmeyer
  • stin13