wrap-comment

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

MIT 2 个版本
安装
npm install wrap-comment
yarn add wrap-comment
pnpm add wrap-comment
bun add wrap-comment
README

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

版本列表
1.0.1 2017-10-15
1.0.0 2017-09-07