replace-comments-x

WebJar for replace-comments-x

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

replace-comments-x
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

replace-comments-x
WebJar for replace-comments-x
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/Xotic750/replace-comments-x

Download replace-comments-x

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/replace-comments-x/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>replace-comments-x</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/replace-comments-x/
implementation 'org.webjars.npm:replace-comments-x:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/replace-comments-x/
implementation ("org.webjars.npm:replace-comments-x:2.0.0")
'org.webjars.npm:replace-comments-x:jar:2.0.0'
<dependency org="org.webjars.npm" name="replace-comments-x" rev="2.0.0">
  <artifact name="replace-comments-x" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='replace-comments-x', version='2.0.0')
)
libraryDependencies += "org.webjars.npm" % "replace-comments-x" % "2.0.0"
[org.webjars.npm/replace-comments-x "2.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : require-coercible-to-string-x jar [1.0.0,2)
org.webjars.npm : to-string-x jar [1.4.2,2)

Project Modules

There are no modules declared in this project.

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

replace-comments-x

Replace the comments in a string.

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

import replaceComments from 'replace-comments-x';

console.log(replaceComments('test; /* test */', '')); // 'test;'
console.log(replaceComments('test; // test', '')); // 'test;'

Versions

Version
2.0.0