Skip to content

goto-bus-stop/wrap-comment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published