Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 409 Bytes

readme.md

File metadata and controls

25 lines (17 loc) · 409 Bytes

wrap-comment

Safely wrap some text in a JavaScript comment, escaping close */ sequences.

Useful if you're commenting text in some source code.

Install

npm install wrap-comment

Usage

var wrapComment = require('wrap-comment')
wrapComment('some text')
// → '/* some text */'
wrapComment('tricky /* text */')
// → '/* tricky /* text *\/ */'

License

MIT