An open API service indexing awesome lists of open source software.

https://github.com/xotic750/string-quote-x

Wrap a string in double quotes.
https://github.com/xotic750/string-quote-x

browser javascript nodejs quote string

Last synced: 2 months ago
JSON representation

Wrap a string in double quotes.

Awesome Lists containing this project

README

          


Travis status


Dependency status


devDependency status


npm version


jsDelivr hits


bettercodehub score


Coverage Status

## string-quote-x

Wrap a string in double quotes.

### `module.exports(string)` ⇒ string

This method wraps a string in double quotes and replaces control characters
with safe escape sequences.

**Kind**: Exported function
**Returns**: string - The wrapped string.

| Param | Type | Description |
| ------ | ------------------- | ------------------------------------------- |
| string | string | The string to safely wrap in double quotes. |

**Example**

```js
import quote from 'string-quote-x';

console.log(quote('hello')); // '"hello"'
```