wrap-comment
Safely wrap some text in a JavaScript comment, escaping close `*/` sequences.
Last updated 3 years ago by goto-bus-stop .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install wrap-comment 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.1                                ...           latest (3 years ago)

2 Versions

  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 32
Last Day 0
Last Week 4
Last Month 36
Dependencies (0)
None
Dev Dependencies (1)

Copyright 2014 - 2016 © taobao.org |