🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

strip-whitespace-loader

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
s

strip-whitespace-loader

Strip whitespace from strings in javascript assets

1.0.4
latest
67

Supply Chain Security

100

Vulnerability

75

Quality

76

Maintenance

100

License

Repository has been archived by the owner.

Deprecated

Maintenance

The maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.

Found 1 instance in 1 package

Version published
Weekly downloads
1.2K
4.67%
Maintainers
1
Weekly downloads
 
Created
Issues
1

strip-whitespace-loader

node Travis AppVeyor Known Vulnerabilities David Greenkeeper badge Coveralls Codacy grade

Strip-Whitespace-Loader is a loader for webpack that will remove extraneous spaces from strings. 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-loader:
function() {
  if (condition) {
    const longString = '  String   with    some    extra   spaces  ';
  }
}
After strip-whitespace-loader:
function() {
  if (condition) {
    const longString = ' String with some extra spaces ';
  }
}
Webpack usage
{
  module: {
    rules:[
      {
        test: /\.js$/,
        loader: [ 'strip-whitespace-loader', 'babel-loader' ]
      },
      {
        test: /\.tsx?$/,
        loader: [ 'strip-whitespace-loader', 'ts-loader' ]
      }
    ]
  }
}

FAQs

Package last updated on 09 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts