Socket
Socket
Sign inDemoInstall

magic-string

Package Overview
Dependencies
1
Maintainers
4
Versions
114
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous1
891112Next

0.4.3

Diff

Changelog

Source

0.4.3

  • Handle Windows-style CRLF newlines when determining whether a line is empty
rich_harris
published 0.4.2 •

Changelog

Source

0.4.2

  • Fix typo in package.json (d'oh again)
  • Use only relative paths for internal modules - makes bundling with dependents (i.e. esperanto) possible
rich_harris
published 0.4.1 •

Changelog

Source

0.4.1

  • Includes correct files in npm package (d'oh)
rich_harris
published 0.4.0 •

Changelog

Source

0.4.0

  • Using experimental Esperanto feature (esperantojs/esperanto#68) to generate version with vlq dependency included
rich_harris
published 0.3.1 •

Changelog

Source

0.3.1

  • Fixes a bug whereby multiple insertions at the same location would cause text to repeat (#5)
rich_harris
published 0.3.0 •

Changelog

Source

0.3.0

  • Breaking change - source.indentStr is null if no lines are indented. Use source.getIndentString() for the old behaviour (guess, and if no lines are indented, return \t)
  • bundle.getIndentString() ignores sources with no indented lines when guessing indentation (#3)
rich_harris
published 0.2.7 •

Changelog

Source

0.2.7

  • source.trimLines() removes empty lines from start/end of source, leaving other whitespace untouched
  • Indentation is not added to an empty source
rich_harris
published 0.2.6 •

Changelog

Source

0.2.6

  • Performance improvement - adjustments are only made when necessary
rich_harris
published 0.2.5 •

Changelog

Source

0.2.5

  • Single spaces are ignored when guessing indentation - experience shows these are more likely to be e.g. JSDoc comments than actual indentation
  • bundle.addSource() can take an indentExclusionRanges option
rich_harris
published 0.2.4 •

Changelog

Source

0.2.4

  • Empty lines are not indented
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc