magic-string
Advanced tools
Comparing version 0.2.7 to 0.3.0
@@ -149,2 +149,4 @@ (function (global, factory) { | ||
if ( indentStr === null ) return; | ||
if ( !indentStringCounts[ indentStr ] ) indentStringCounts[ indentStr ] = 0; | ||
@@ -261,2 +263,6 @@ indentStringCounts[ indentStr ] += 1; | ||
if ( tabbed.length === 0 && spaced.length === 0 ) { | ||
return null; | ||
} | ||
// More lines tabbed than spaced? Assume tabs, and | ||
@@ -450,2 +456,6 @@ // default to tabs in the case of a tie (or nothing | ||
getIndentString: function () { | ||
return this.indentStr === null ? '\t' : this.indentStr; | ||
}, | ||
getMappings: function ( hires, sourceIndex, offsets ) { | ||
@@ -472,3 +482,3 @@ return encodeMappings( this.original, this.str, this.mappings, hires, sourceIndex, offsets ); | ||
indentStr = indentStr !== undefined ? indentStr : this.indentStr; | ||
indentStr = indentStr !== undefined ? indentStr : ( this.indentStr || '\t' ); | ||
@@ -475,0 +485,0 @@ options = options || {}; |
@@ -5,3 +5,3 @@ { | ||
"author": "Rich Harris", | ||
"version": "0.2.7", | ||
"version": "0.3.0", | ||
"repository": "https://github.com/rich-harris/magic-string", | ||
@@ -8,0 +8,0 @@ "main": "magic-string.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24055
595