check-quote.js 309 B

123456789101112131415
  1. module.exports = checkQuote
  2. function checkQuote(context) {
  3. var marker = context.options.quote || '"'
  4. if (marker !== '"' && marker !== "'") {
  5. throw new Error(
  6. 'Cannot serialize title with `' +
  7. marker +
  8. '` for `options.quote`, expected `"`, or `\'`'
  9. )
  10. }
  11. return marker
  12. }