wrap-comment

1.0.1 • Public • Published

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

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i wrap-comment

    Weekly Downloads

    18,533

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • goto-bus-stop