text

trimComment

For strings which look like extended jsdoc comment line (e.g. * whatever), eschew the comment decoration

Usage

expect(trimComment('          * zipzop')).toEqual('zipzop')
expect(trimComment(' * squiggle         ')).toEqual('squiggle')
const input = ' ~~kljlkjlk2j32lkj3 ' + Math.round(Math.random() * 1000)
expect(trimComment(input)).toEqual(input)
expect(trimComment(29292)).toEqual(29292)

Tools for Monorepos