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

detect-indent

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detect-indent - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

8

detect-indent.js

@@ -12,2 +12,6 @@ (function () {

function detectIndent(str) {
if (typeof str !== 'string') {
throw new Error('Argument must be a string.');
}
var lines = str.replace(RE_MULTILINE_COMMENTS, '').split(/\n|\r\n?/);

@@ -49,2 +53,6 @@ var tabs = 0;

if (spaces.length === 0) {
return null;
}
// greatest common divisor is most likely the indent size

@@ -51,0 +59,0 @@ var indentSize = spaces.reduce(gcd);

2

package.json
{
"name": "detect-indent",
"version": "0.1.2",
"version": "0.1.3",
"description": "Detect the indentation of code",

@@ -5,0 +5,0 @@ "keywords": [

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