Package Exports
- replace-comments-x
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (replace-comments-x) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
replace-comments-x
Replace the comments in a string.
Version: 2.0.0
Author: Xotic750 Xotic750@gmail.com
License: MIT
Copyright: Xotic750
module.exports(string, [replacement])
⇒ string
⏏
This method replaces comments in a string.
Kind: Exported function
Returns: string
- The new string with the comments replaced.
Throws:
TypeError
If string is null or undefined or not coercible.TypeError
If replacement is not coercible.
Param | Type | Description |
---|---|---|
string | string |
The string to be stripped. |
[replacement] | string |
The string to be used as a replacement. |
Example
var replaceComments = require('replace-comments-x');
replaceComments(test;/* test * /, ''), // 'test;'
replaceComments(test; // test, ''), // 'test;'