1.0.1 • Published 3 years ago

quote-it v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

quote-it

build status Test coverage NPM version NPM Downloads

Safe quoting a given string without adding duplicate quotes

API

quote

index.js:46-57

Uses quoteChar to wrap string.

Parameters

  • string {string}
  • quoteChar {string}

Examples

import quote from 'quote-it'
quote('abc', "'") === "'abc'"

Returns string

single

index.js:68-70

Uses single quote to wrap string.

Parameters

  • string

Examples

import { single } from 'quote-it'
single("a'bc") === "'a'bc'"

Returns string

double

index.js:78-80

Uses double quote to wrap string.

Parameters

  • string

Returns string

License

MIT

1.0.1

3 years ago

1.0.0

3 years ago