Socket
Socket
Sign inDemoInstall

detab

Package Overview
Dependencies
1
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

5

history.md

@@ -8,3 +8,8 @@ ---

1.0.1 / 2015-07-06
==================
* Fix incorrectly detabbing for multiple tabs ([457161c](https://github.com/wooorm/detab/commit/457161c))
1.0.0 / 2015-07-06
==================

7

index.js

@@ -15,2 +15,3 @@ 'use strict';

var NEWLINE = '\n';
var SPACE = ' ';

@@ -38,2 +39,3 @@ /**

var character;
var add;

@@ -49,4 +51,5 @@ if (!string) {

if (character === TAB) {
column += characters[index];
characters[index] = repeat(' ', tabSize - (column % tabSize));
add = tabSize - (column % tabSize);
characters[index] = repeat(SPACE, add);
column += add - 1;
} else if (character === NEWLINE) {

@@ -53,0 +56,0 @@ column = -1;

{
"name": "detab",
"version": "1.0.0",
"version": "1.0.1",
"description": "Detab: tabs -> spaces",

@@ -5,0 +5,0 @@ "license": "MIT",

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