check-bullet.js 335 B

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