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.0 to 0.2.1

8

magic-string.js

@@ -68,2 +68,6 @@ (function (global, factory) {

addSource: function ( source ) {
if ( typeof source !== 'object' || !source.content ) {
throw new Error( 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`' );
}
this.sources.push( source );

@@ -143,4 +147,4 @@ return this;

this.intro = indentStr + this.intro.replace( /\n/g, '\n' + indentStr );
this.outro = this.outro.replace( /\n/g, '\n' + indentStr );
this.intro = ( this.intro ? indentStr : '' ) + this.intro.replace( /\n(.+)/g, ( '\n' + indentStr + '$1' ) );
this.outro = this.outro.replace( /\n(.+)/g, ( '\n' + indentStr + '$1' ) );

@@ -147,0 +151,0 @@ return this;

{
"name": "magic-string",
"description": "Modify strings, generate sourcemaps",
"author": "Rich Harris",
"version": "0.2.0",
"version": "0.2.1",
"repository": "https://github.com/rich-harris/magic-string",

@@ -6,0 +7,0 @@ "main": "magic-string.js",

@@ -5,3 +5,3 @@ # magic-string

Your requirements are, frankly, rather niche. But they're requirements that I also have, and for which I made magic-string. It's a small, fast utility for manipulating strings.
Your requirements are, frankly, rather niche. But they're requirements that I also have, and for which I made magic-string. It's a small, fast utility for manipulating strings and generating sourcemaps.

@@ -8,0 +8,0 @@ ## Installation

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