package
Safely wrap some text in a JavaScript comment, escaping close `*/` sequences.
npm install wrap-commentGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Safely wrap some text in a JavaScript comment, escaping close */ sequences.
Useful if you're commenting text in some source code.
npm install wrap-commentvar wrapComment = require('wrap-comment')
wrapComment('some text')
// → '/* some text */'
wrapComment('tricky /* text */')
// → '/* tricky /* text *\/ */'