JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 455
  • Score
    100M100P100Q95759F
  • License MIT

Remove indentations in a block of code

Package Exports

  • unindent

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (unindent) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

unindent

Remove indentations in a block of code

Installation

npm install unindent

Example

var assert = require('assert');
var unindent = require('unindent');
var code = '\ta\t\tb';

assert.equal(unindent(code), 'a\tb');

API

unindent(code, [opts]);
  • code - A string of code.
  • opts - An optional object literal support these options:
    • tabSize - A number. If specified, the starting tabs of each line will be convert to spaces.