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.
- Host: GitHub
- URL: https://github.com/xotic750/string-quote-x
- Owner: Xotic750
- License: mit
- Created: 2017-06-10T18:32:16.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T22:58:42.000Z (over 3 years ago)
- Last Synced: 2024-04-26T02:41:42.045Z (about 2 years ago)
- Topics: browser, javascript, nodejs, quote, string
- Language: JavaScript
- Size: 3.3 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 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"'
```