detabbify

Browserify transform to strip tabs from bundles

Usage no npm install needed!

<script type="module">
  import detabbify from 'https://cdn.skypack.dev/detabbify';
</script>

README

detabbify NPM Version Build Status

Replace tabs with spaces when running files through browserify.

Options

spaces

Configure how many spaces each \t character will be replaced with. Defaults to 4 spaces.

Usage

CLI

// Recommended to run globally
$ browserify ./file-with-spaces.js -g detabbify ./output.js

// Specify number of spaces
$ browserify ./file-with-spaces.js -g [ detabbify --spaces 4 ] ./output.js

API

var build = browserify("./file-with-spaces.js");

// Recommended to run globally
build.transform(detabbify, { global : true });

// Specify number of spaces
build.transform(detabbify, { global : true, spaces : 4 });