Socket
Socket
Sign inDemoInstall

replace-comments-x

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

replace-comments-x - npm Package Compare versions

Comparing version 1.0.1 to 1.0.3

12

index.js
/**
* @file Replace the comments in a string.
* @version 1.0.1
* @version 1.0.3
* @author Xotic750 <Xotic750@gmail.com>

@@ -15,7 +15,2 @@ * @copyright Xotic750

var $replaceComments = function replaceComments(string) {
var replacement = arguments.length > 1 && isString(arguments[1]) ? arguments[1] : '';
return isString(string) ? string.replace(STRIP_COMMENTS, replacement) : '';
};
/**

@@ -33,2 +28,5 @@ * This method replaces comments in a string.

*/
module.exports = $replaceComments;
module.exports = function replaceComments(string) {
var replacement = arguments.length > 1 && isString(arguments[1]) ? arguments[1] : '';
return isString(string) ? string.replace(STRIP_COMMENTS, replacement) : '';
};
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.returnExports = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
/**
* @file Replace the comments in a string.
* @version 1.0.1
* @version 1.0.3
* @author Xotic750 <Xotic750@gmail.com>

@@ -16,7 +16,2 @@ * @copyright Xotic750

var $replaceComments = function replaceComments(string) {
var replacement = arguments.length > 1 && isString(arguments[1]) ? arguments[1] : '';
return isString(string) ? string.replace(STRIP_COMMENTS, replacement) : '';
};
/**

@@ -34,3 +29,6 @@ * This method replaces comments in a string.

*/
module.exports = $replaceComments;
module.exports = function replaceComments(string) {
var replacement = arguments.length > 1 && isString(arguments[1]) ? arguments[1] : '';
return isString(string) ? string.replace(STRIP_COMMENTS, replacement) : '';
};

@@ -37,0 +35,0 @@ },{"is-string":2}],2:[function(_dereq_,module,exports){

!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).returnExports=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){/**
* @file Replace the comments in a string.
* @version 1.0.1
* @version 1.0.3
* @author Xotic750 <Xotic750@gmail.com>

@@ -5,0 +5,0 @@ * @copyright Xotic750

{
"name": "replace-comments-x",
"version": "1.0.1",
"version": "1.0.3",
"description": "Replace the comments in a string.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/Xotic750/replace-comments-x",

@@ -26,3 +26,3 @@ <a href="https://travis-ci.org/Xotic750/replace-comments-x"

**Version**: 1.0.1
**Version**: 1.0.3
**Author**: Xotic750 <Xotic750@gmail.com>

@@ -33,6 +33,6 @@ **License**: [MIT](&lt;https://opensource.org/licenses/MIT&gt;)

### `module.exports` ⇒ <code>string</code> ⏏
### `module.exports(string, [replacement])` ⇒ <code>string</code> ⏏
This method replaces comments in a string.
**Kind**: Exported member
**Kind**: Exported function
**Returns**: <code>string</code> - The new string with the comments replaced.

@@ -39,0 +39,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc