index.es5.js
function quote(string) {
  var _Object$assign

  var quoteChar = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '"'

  if (quoteChar.length > 1 && process.env.NODE_ENV !== 'production') {
    console.error('quote: `quoteChar` is recommended as single character, but ' + JSON.stringify(quoteChar) + '.')
  }

  return _quote(
    string,
    quoteChar,
    getEscapable(quoteChar),
    Object.assign(
      {},
      commonMeta,
      ((_Object$assign = {}), (_Object$assign[quoteChar] = '\\' + quoteChar), _Object$assign)
    )
  )
}
function quote(string) {
  var _Object$assign

  var quoteChar = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '"'

  if (quoteChar.length > 1 && process.env.NODE_ENV !== 'production') {
    console.error('quote: `quoteChar` is recommended as single character, but ' + JSON.stringify(quoteChar) + '.')
  }

  return _quote(
    string,
    quoteChar,
    getEscapable(quoteChar),
    Object.assign(
      {},
      commonMeta,
      ((_Object$assign = {}), (_Object$assign[quoteChar] = '\\' + quoteChar), _Object$assign)
    )
  )
}
function quote ( string ) { var _Object$assign var quoteChar = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : '"' if ( quoteChar . length > 1 && process . env . NODE_ENV !== 'production' ) { console . error ( 'quote: `quoteChar` is recommended as single character, but ' + JSON . stringify ( quoteChar ) + '.' ) } return _quote ( string , quoteChar , getEscapable ( quoteChar ) , Object . assign ( { } , commonMeta , ( ( _Object$assign = { } ) , ( _Object$assign [ quoteChar ] = '\\' + quoteChar ) , _Object$assign ) ) ) }
Uses `quoteChar` to wrap string.
@public
@param string {string}
@param quoteChar {string}
@return {string}
@example
import quote from 'quote-it'
quote("abc", "'") === "'abc'"
Uses quoteChar to wrap string .