Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

detab

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detab

Detab: tabs -> spaces

  • 3.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is detab?

The detab npm package is a utility for converting tabs in a string to spaces. It is particularly useful when dealing with code or text that needs to be formatted with a consistent number of spaces instead of tabs for better readability or to conform to certain coding standards.

What are detab's main functionalities?

Tab to Space Conversion

Converts all tabs in a string to a specified number of spaces. In this example, each tab is replaced with 4 spaces.

const detab = require('detab');
const textWithTabs = 'Hello\tWorld';
const textWithSpaces = detab(textWithTabs, 4);
console.log(textWithSpaces); // Output: 'Hello    World'

Other packages similar to detab

Keywords

FAQs

Package last updated on 11 Mar 2021

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc