Urara-Blog/node_modules/.pnpm-store/v3/files/24/e6f783276d8c6bbbba5ac1a12275498c4b8862e7e5bf99804650e98522848796acfaa16850bc77b3b28d45bfb02911e6cd1a526c2fd5c574e75deb330cd65a
2022-08-14 01:14:53 +08:00

22 lines
515 B
Text

/**
* @typedef {import('../types.js').Context} Context
* @typedef {import('../types.js').Options} Options
*/
/**
* @param {Context} context
* @returns {Exclude<Options['bullet'], undefined>}
*/
export function checkBullet(context) {
const marker = context.options.bullet || '*'
if (marker !== '*' && marker !== '+' && marker !== '-') {
throw new Error(
'Cannot serialize items with `' +
marker +
'` for `options.bullet`, expected `*`, `+`, or `-`'
)
}
return marker
}