{"name":"magic-string","description":"Modify strings, generate sourcemaps","dist-tags":{"latest":"0.25.9"},"versions":{"0.25.9":{"name":"magic-string","version":"0.25.9","description":"Modify strings, generate sourcemaps","repository":{"type":"git","url":"git+https://github.com/rich-harris/magic-string.git"},"license":"MIT","author":{"name":"Rich Harris"},"main":"dist/magic-string.cjs.js","module":"dist/magic-string.es.js","jsnext:main":"dist/magic-string.es.js","typings":"index.d.ts","scripts":{"build":"rollup -c","changelog":"conventional-changelog -p angular -i CHANGELOG.md -s","format":"prettier --single-quote --print-width 100 --use-tabs --write src/*.js src/**/*.js","lint":"eslint src test","prepare":"npm run build","prepublishOnly":"rm -rf dist && npm test","release":"bumpp -x \"npm run changelog\" --all --commit --tag --push && npm publish","pretest":"npm run lint && npm run build","test":"mocha","watch":"rollup -cw"},"dependencies":{"sourcemap-codec":"^1.4.8"},"devDependencies":{"@rollup/plugin-buble":"^0.21.3","@rollup/plugin-node-resolve":"^13.1.3","@rollup/plugin-replace":"^4.0.0","bumpp":"^7.1.1","conventional-changelog-cli":"^2.2.2","eslint":"^7.32.0","mocha":"^9.2.1","prettier":"^2.5.1","rollup":"^2.69.0","source-map":"^0.6.1","source-map-support":"^0.5.21"},"gitHead":"69336fccbb46e721d58faa5c7a0d0b7ed6ee09d2","bugs":{"url":"https://github.com/rich-harris/magic-string/issues"},"_id":"magic-string@0.25.9","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==","shasum":"de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c","tarball":"http://localhost:4260/magic-string/magic-string-0.25.9.tgz","fileCount":10,"unpackedSize":373056,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIHOYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7eg//b6qpgtc+FurMJQRYvhU9BQPkLx+ILEOPzmw5F6pik3p4vZfd\r\nnWm52DYJN60O0LOHqn4/oaccJoN9UgWu8O7XLWSYOJthVFFgpEjEHn/K7tFb\r\ntLSCAfH/z27pUJQMFVCG/I9Cqkm1KiwTtA4vcU0yLo/J3CUHOwzHhViw7Y1o\r\nQUl66CNGNJ1xS0mF/YW7I1MWbxlDAitYZWua+x+t+pZUmIZSim9eL4+QN2Wd\r\nEkZmd7qC8sUMU7jYwYUrjBBsYODyoHA4MT21AoEu2meOGEe799sxlxAB6ahs\r\nuTOKtzID+j9YrBi90nqWggIRBIPAHQKIFS3u6urub921A/Hoi7LYcdV06h9O\r\nwCq7qEi1ECPh8XjO4SNzu54FJxoXGQb1wAHzuVMJP2Wc2FU0SbcYi/zBTiwF\r\nJZNgGG/Z8Qsn8/He2LilwfwR6VZPloONEEcI7xpLufcxAQJdtUJDRgDc1AGg\r\nSPv25CPe4mU19Faojsybsu0xkcTtTAJ2DJeYpCa8SVh89G8FCZkKCDK49x6i\r\niuS3aKdH1TVtaHjVDA1siqRqG4iclwMVRPoLfPLhOAgBJ93sWW8HVtkssHrh\r\no9zASPgva3E5AWw2vkFKQljuK6SAqnIRh1iA+muBAI1GjTzX5EQViJ9c4goe\r\nonQO2QsrVQWLRQO601TqgWHTFJgO2xzQIOc=\r\n=bJY0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDV8jwBjaFd+UCnIJ2mVDguMYVlrR3OXkx6DiSS8W/f8wIgJXOLH/EUy9wYN0a6HdqJ8zH1CfWuDJ9Okiyb9ecS4Js="}]},"directories":{},"_hasShrinkwrap":false}},"readme":"# magic-string\n\n<a href=\"https://travis-ci.org/Rich-Harris/magic-string\">\n <img src=\"http://img.shields.io/travis/Rich-Harris/magic-string.svg\"\n alt=\"build status\">\n</a>\n<a href=\"https://npmjs.org/package/magic-string\">\n <img src=\"https://img.shields.io/npm/v/magic-string.svg\"\n alt=\"npm version\">\n</a>\n<a href=\"https://github.com/Rich-Harris/magic-string/blob/master/LICENSE.md\">\n <img src=\"https://img.shields.io/npm/l/magic-string.svg\"\n alt=\"license\">\n</a>\n\nSupposeyouhavesomesourcecode.Youwanttomakesomelightmodificationstoit-replacingafewcharactershereandthere,wrappingitwithaheaderandfooter,etc-andideallyyou'dliketogeneratea[sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/) at the end of it. You've thought about using something like [recast](https://github.com/benjamn/recast) (which allows you to generate an AST from some JavaScript, manipulate it, and reprint it with a sourcemap without losing your comments and formatting), but it seems like overkill for your needs (or