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

magic-string

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magic-string - npm Package Compare versions

Comparing version 0.2.7 to 0.3.0

12

magic-string.js

@@ -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 || {};

2

package.json

@@ -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",

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