# to-str

> Converts the given value to a string.

Latest version **1.0.0** (published 2016-04-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install to-str
pnpm add to-str
yarn add to-str
bun add to-str
```

## 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.0.0 |
| Published | 2016-04-13 |
| First published | 2016-04-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | bubkoo |
| Keywords | to, parse, convert, converter, parser, string, str |

## Links

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

## Dependencies (4)

- [is-nil](https://npm.io/package/is-nil.md) ^1.0.0
- [is-object](https://npm.io/package/is-object.md) ^1.0.1
- [is-symbol](https://npm.io/package/is-symbol.md) ^1.0.1
- [is-function](https://npm.io/package/is-function.md) ^1.0.1

## 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.0.0 (latest) — 2016-04-13
- 0.0.0 — 2016-04-13

## README

# to-str

> Converts the given value to a string.



[![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/bubkoo/to-str/blob/master/LICENSE)

[![build:?](https://img.shields.io/travis/bubkoo/to-str/master.svg?style=flat-square)](https://travis-ci.org/bubkoo/to-str)
[![coverage:?](https://img.shields.io/coveralls/bubkoo/to-str/master.svg?style=flat-square)](https://coveralls.io/github/bubkoo/to-str)


## Install

```
$ npm install --save to-str 
```


## Usage

> For more use-cases see the [tests](https://github.com/bubkoo/to-str/blob/master/test/spec/index.js)

```js
var toString = require('to-str');

toString();          // => ''
toString(null);      // => ''
toString(0);         // => '0'
toString(-0);        // => '-0'
toString('abc');     // => 'abc'
toString('-1.100');  // => -1
toString([1, 2, 3]); // => '1,2,3'

toString({ foo: 'bar' });        
// => '[object Object]'

toString(function () { console.log(123); });
// => 'function () { console.log(123); }'
```

## Related

- [to-num](https://github.com/bubkoo/to-num) - Converts the given value to a number.
- [to-integer](https://github.com/bubkoo/to-integer) - Converts the given value to an integer.
- [to-length](https://github.com/bubkoo/to-length) - Converts value to an integer suitable for use as the length of an array-like object.
- [to-lower](https://github.com/bubkoo/to-lower) - Converts string, as a whole, to lower case.
- [to-upper](https://github.com/bubkoo/to-upper) - Converts string, as a whole, to upper case.
- [to-path](https://github.com/bubkoo/to-path) - Converts value to a property path array. 
- [to-source-code](https://github.com/bubkoo/to-source-code.git) - Converts function to its source code.


## Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please [create an issue](https://github.com/bubkoo/to-str/issues/new).

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