Socket
Socket
Sign inDemoInstall

strip-whitespace-plugin

Package Overview
Dependencies
5
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.6 to 0.0.7

7

package.json
{
"name": "strip-whitespace-plugin",
"version": "0.0.6",
"version": "0.0.7",
"description": "Strip whitespace from strings in javascript assets",

@@ -17,3 +17,3 @@ "main": "index.js",

"type": "git",
"url": "git+ssh://git@github.com/markis/de-dupe.git"
"url": "git+ssh://git@github.com/markis/strip-whitespace-plugin.git"
},

@@ -39,3 +39,4 @@ "keywords": [

"tslint": "^4.4.2",
"typescript": "^2.2.1"
"typescript": "^2.2.1",
"webpack": "^2.2.1"
},

@@ -42,0 +43,0 @@ "dependencies": {

@@ -5,7 +5,9 @@ # strip-whitespace-plugin

Before strip-whitespace:
Strip-Whitespace-Plugin will remove extraneous spaces from string. It's perfect for working with rendering templates (ex. mustache, handlebars) or es6 javascript templates. It works with anything where you might create very long strings.
##### Before strip-whitespace:
```
function() {
if (condition) {
const longString = ' x ';
const longString = ' String with some extra spaces ';
}

@@ -15,7 +17,7 @@ }

After strip-whitespace:
##### After strip-whitespace:
```
function() {
if (condition) {
const longString = ' x ';
const longString = ' String with some extra spaces ';
}

@@ -25,2 +27,19 @@ }

##### Webpack usage
Put this plugin before your minification plugins (ex. uglify-js)
```
var stripWhitespace = require('../index.js');
module.exports = {
...
plugins: [
new stripWhitespace(),
...
// put your minification plugins here.
]
...
};
```
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/
/******/ // Create a new module (and put it into the cache)

@@ -18,23 +18,23 @@ /******/ var module = installedModules[moduleId] = {

/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports

@@ -50,3 +50,3 @@ /******/ __webpack_require__.d = function(exports, name, getter) {

/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules

@@ -60,9 +60,9 @@ /******/ __webpack_require__.n = function(module) {

/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports

@@ -69,0 +69,0 @@ /******/ return __webpack_require__(__webpack_require__.s = 0);

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc