{
  "manifest": {
    "name": "convert-source-map",
    "version": "2.0.0",
    "description": "Converts a source-map from/to  different formats and allows adding/changing properties.",
    "main": "index.js",
    "scripts": {
      "test": "tap test/*.js --color"
    },
    "repository": {
      "type": "git",
      "url": "git://github.com/thlorenz/convert-source-map.git"
    },
    "homepage": "https://github.com/thlorenz/convert-source-map",
    "devDependencies": {
      "inline-source-map": "~0.6.2",
      "tap": "~9.0.0"
    },
    "keywords": [
      "convert",
      "sourcemap",
      "source",
      "map",
      "browser",
      "debug"
    ],
    "author": {
      "name": "Thorsten Lorenz",
      "email": "thlorenz@gmx.de",
      "url": "http://thlorenz.com"
    },
    "license": "MIT",
    "engine": {
      "node": ">=4"
    },
    "files": [
      "index.js"
    ],
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-convert-source-map-2.0.0-4b560f649fc4e918dd0ab75cf4961e8bc882d82a-integrity/node_modules/convert-source-map/package.json",
    "readmeFilename": "README.md",
    "readme": "# convert-source-map [![Build Status][ci-image]][ci-url]\n\nConverts a source-map from/to  different formats and allows adding/changing properties.\n\n```js\nvar convert = require('convert-source-map');\n\nvar json = convert\n  .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')\n  .toJSON();\n\nvar modified = convert\n  .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')\n  .setProperty('sources', [ 'SRC/FOO.JS' ])\n  .toJSON();\n\nconsole.log(json);\nconsole.log(modified);\n```\n\n```json\n{\"version\":3,\"file\":\"build/foo.min.js\",\"sources\":[\"src/foo.js\"],\"names\":[],\"mappings\":\"AAAA\",\"sourceRoot\":\"/\"}\n{\"version\":3,\"file\":\"build/foo.min.js\",\"sources\":[\"SRC/FOO.JS\"],\"names\":[],\"mappings\":\"AAAA\",\"sourceRoot\":\"/\"}\n```\n\n## Upgrading\n\nPrior to v2.0.0, the `fromMapFileComment` and `fromMapFileSource` functions took a String directory path and used that to resolve & read the source map file from the filesystem. However, this made the library limited to nodejs environments and broke on sources with querystrings.\n\nIn v2.0.0, you now need to pass a function that does the file reading. It will receive the source filename as a String that you can resolve to a filesystem path, URL, or anything else.\n\nIf you are using `convert-source-map` in nodejs and want the previous behavior, you'll use a function like such:\n\n```diff\n+ var fs = require('fs'); // Import the fs module to read a file\n+ var path = require('path'); // Import the path module to resolve a path against your directory\n- var conv = convert.fromMapFileSource(css, '../my-dir');\n+ var conv = convert.fromMapFileSource(css, function (filename) {\n+   return fs.readFileSync(path.resolve('../my-dir', filename), 'utf-8');\n+ });\n```\n\n## API\n\n### fromObject(obj)\n\nReturns source map converter from given object.\n\n### fromJSON(json)\n\nReturns source map converter from given json string.\n\n### fromURI(uri)\n\nReturns source map converter from given uri encoded json string.\n\n### fromBase64(base64)\n\nReturns source map converter from given base64 encoded json string.\n\n### fromComment(comment)\n\nReturns source map converter from given base64 or uri encoded json string prefixed with `//# sourceMappingURL=...`.\n\n### fromMapFileComment(comment, readMap)\n\nReturns source map converter from given `filename` by parsing `//# sourceMappingURL=filename`.\n\n`readMap` must be a function which receives the source map filename and returns either a String or Buffer of the source map (if read synchronously), or a `Promise` containing a String or Buffer of the source map (if read asynchronously).\n\nIf `readMap` doesn't return a `Promise`, `fromMapFileComment` will return a source map converter synchronously.\n\nIf `readMap` returns a `Promise`, `fromMapFileComment` will also return `Promise`. The `Promise` will be either resolved with the source map converter or rejected with an error.\n\n#### Examples\n\n**Synchronous read in Node.js:**\n\n```js\nvar convert = require('convert-source-map');\nvar fs = require('fs');\n\nfunction readMap(filename) {\n  return fs.readFileSync(filename, 'utf8');\n}\n\nvar json = convert\n  .fromMapFileComment('//# sourceMappingURL=map-file-comment.css.map', readMap)\n  .toJSON();\nconsole.log(json);\n```\n\n\n**Asynchronous read in Node.js:**\n\n```js\nvar convert = require('convert-source-map');\nvar { promises: fs } = require('fs'); // Notice the `promises` import\n\nfunction readMap(filename) {\n  return fs.readFile(filename, 'utf8');\n}\n\nvar converter = await convert.fromMapFileComment('//# sourceMappingURL=map-file-comment.css.map', readMap)\nvar json = converter.toJSON();\nconsole.log(json);\n```\n\n**Asynchronous read in the browser:**\n\n```js\nvar convert = require('convert-source-map');\n\nasync function readMap(url) {\n  const res = await fetch(url);\n  return res.text();\n}\n\nconst converter = await convert.fromMapFileComment('//# sourceMappingURL=map-file-comment.css.map', readMap)\nvar json = converter.toJSON();\nconsole.log(json);\n```\n\n### fromSource(source)\n\nFinds last sourcemap comment in file and returns source map converter or returns `null` if no source map comment was found.\n\n### fromMapFileSource(source, readMap)\n\nFinds last sourcemap comment in file and returns source map converter or returns `null` if no source map comment was found.\n\n`readMap` must be a function which receives the source map filename and returns either a String or Buffer of the source map (if read synchronously), or a `Promise` containing a String or Buffer of the source map (if read asynchronously).\n\nIf `readMap` doesn't return a `Promise`, `fromMapFileSource` will return a source map converter synchronously.\n\nIf `readMap` returns a `Promise`, `fromMapFileSource` will also return `Promise`. The `Promise` will be either resolved with the source map converter or rejected with an error.\n\n### toObject()\n\nReturns a copy of the underlying source map.\n\n### toJSON([space])\n\nConverts source map to json string. If `space` is given (optional), this will be passed to\n[JSON.stringify](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify) when the\nJSON string is generated.\n\n### toURI()\n\nConverts source map to uri encoded json string.\n\n### toBase64()\n\nConverts source map to base64 encoded json string.\n\n### toComment([options])\n\nConverts source map to an inline comment that can be appended to the source-file.\n\nBy default, the comment is formatted like: `//# sourceMappingURL=...`, which you would\nnormally see in a JS source file.\n\nWhen `options.encoding == 'uri'`, the data will be uri encoded, otherwise they will be base64 encoded.\n\nWhen `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file.\n\n### addProperty(key, value)\n\nAdds given property to the source map. Throws an error if property already exists.\n\n### setProperty(key, value)\n\nSets given property to the source map. If property doesn't exist it is added, otherwise its value is updated.\n\n### getProperty(key)\n\nGets given property of the source map.\n\n### removeComments(src)\n\nReturns `src` with all source map comments removed\n\n### removeMapFileComments(src)\n\nReturns `src` with all source map comments pointing to map files removed.\n\n### commentRegex\n\nProvides __a fresh__ RegExp each time it is accessed. Can be used to find source map comments.\n\nBreaks down a source map comment into groups: Groups: 1: media type, 2: MIME type, 3: charset, 4: encoding, 5: data.\n\n### mapFileCommentRegex\n\nProvides __a fresh__ RegExp each time it is accessed. Can be used to find source map comments pointing to map files.\n\n### generateMapFileComment(file, [options])\n\nReturns a comment that links to an external source map via `file`.\n\nBy default, the comment is formatted like: `//# sourceMappingURL=...`, which you would normally see in a JS source file.\n\nWhen `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file.\n\n[ci-url]: https://github.com/thlorenz/convert-source-map/actions?query=workflow:ci\n[ci-image]: https://img.shields.io/github/workflow/status/thlorenz/convert-source-map/CI?style=flat-square\n",
    "licenseText": "Copyright 2013 Thorsten Lorenz. \nAll rights reserved.\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz",
    "hash": "4b560f649fc4e918dd0ab75cf4961e8bc882d82a",
    "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
    "registry": "npm",
    "packageName": "convert-source-map",
    "cacheIntegrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== sha1-S1YPZJ/E6RjdCrdc9JYei8iC2Co="
  },
  "registry": "npm",
  "hash": "4b560f649fc4e918dd0ab75cf4961e8bc882d82a"
}