quote-it
v1.0.1
Published
Safe quoting a given string without adding duplicate quotes
Downloads
5
Readme
quote-it
Safe quoting a given string without adding duplicate quotes
API
quote
Uses quoteChar
to wrap string.
Parameters
string
{string}quoteChar
{string}
Examples
import quote from 'quote-it'
quote('abc', "'") === "'abc'"
Returns string
single
Uses single quote to wrap string.
Parameters
string
Examples
import { single } from 'quote-it'
single("a'bc") === "'a'bc'"
Returns string
double
Uses double quote to wrap string.
Parameters
string
Returns string
License
MIT