{
  "_args": [
    [
      {
        "raw": "get-source@^1.0.32",
        "scope": null,
        "escapedName": "get-source",
        "name": "get-source",
        "rawSpec": "^1.0.32",
        "spec": ">=1.0.32 <2.0.0",
        "type": "range"
      },
      "/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/stacktracey"
    ]
  ],
  "_from": "get-source@^1.0.32",
  "_hasShrinkwrap": false,
  "_id": "get-source@1.0.33",
  "_location": "/get-source",
  "_nodeVersion": "8.15.1",
  "_npmOperationalInternal": {
    "host": "s3://npm-registry-packages",
    "tmp": "tmp/get-source_1.0.33_1552283128815_0.11031172842719816"
  },
  "_npmUser": {
    "name": "xpl",
    "email": "rocket.mind@gmail.com"
  },
  "_npmVersion": "6.4.1",
  "_phantomChildren": {},
  "_requested": {
    "raw": "get-source@^1.0.32",
    "scope": null,
    "escapedName": "get-source",
    "name": "get-source",
    "rawSpec": "^1.0.32",
    "spec": ">=1.0.32 <2.0.0",
    "type": "range"
  },
  "_requiredBy": [
    "/stacktracey"
  ],
  "_resolved": "https://registry.npmjs.org/get-source/-/get-source-1.0.33.tgz",
  "_shasum": "85a3e8ba7dd8d2eab581a05a22956ce0b57ec697",
  "_shrinkwrap": null,
  "_spec": "get-source@^1.0.32",
  "_where": "/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/stacktracey",
  "author": {
    "name": "Vitaly Gordon",
    "email": "rocket.mind@gmail.com"
  },
  "bugs": {
    "url": "https://github.com/xpl/get-source/issues"
  },
  "dependencies": {
    "data-uri-to-buffer": "^2.0.0",
    "source-map": "^0.6.1"
  },
  "description": "Platform-agnostic source code inspection, with sourcemaps support",
  "devDependencies": {
    "chai": "^3.5.0",
    "chromedriver": "^2.46.0",
    "coveralls": "^3.0.3",
    "istanbul": "^0.4.5",
    "memory-fs": "^0.3.0",
    "mocha": "^6.0.2",
    "nyc": "^13.3.0",
    "selenium-webdriver": "^3.6.0",
    "webpack": "^3.12.0"
  },
  "directories": {},
  "dist": {
    "integrity": "sha512-oMpwxaA5RkyUIM88cbavNCbb0n+n4vAICOikTIO0g1o5xNpijPODflFNk9nSMvR6GJqfkUGf2BjO6c0/9B9/Qw==",
    "shasum": "85a3e8ba7dd8d2eab581a05a22956ce0b57ec697",
    "tarball": "https://registry.npmjs.org/get-source/-/get-source-1.0.33.tgz",
    "fileCount": 20,
    "unpackedSize": 26291,
    "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchfX5CRA9TVsSAnZWagAAtC8QAJ1Z5nsq7y6/wCDn9tTx\nxMk9gdGPd70Ut7D5QhE+/qrgFXFKg2fGbeFSMGP//2JTP1oB5oIE7OBG2Ms6\n/W0Uny9T/HvqbNfW18p8kXkZEYdtucDuv4uCKaRv+nwlnIV/AGRuQwCQOUX/\nWKwHxdVvEOvdI6gmeQUNfsUhy+NK0LM3pRnGSHPXL/FDLD9ZBLb5X36pZPEe\nx1PZnKw/izPzBS1TiOXb0oWGAERC+Zg4J7iKK9a7uIJXS/mSiNKVTZwIZBoN\n3WBsZjlZZDuDOfEGSqkr57n3D08tZWJQLrYTitqurgt/0iPQaNmzuRY2rkwF\nf54meJCPi2ricart6+VVH9nPP9aWtwRsk0ozKQ/KjDD5n7GHFJQmfaU6LTVh\nekpc+qPAqpE0gN21GkvuhmpD3TXGpeLlcvtwUVAoco+6kHQxOADDIGJznLIt\nJNwaGTZ6YprBZ6CBBoSG2L/nPX07DDdYeMcYMETx1kKhI3IHCc9vYMbxIT6a\nQ+ZmYj0+gLmI5n71qSPbqGpTohR91nCGXAO3zmbMc4r8E4pIYSVBjj3eQqoF\ncn+SkcMsqqEOEqeNjVHDNdAqx5jgvuqXTFKcmk3dE4h31PXCjHiJh3KuYwTZ\nQDXhSVSgKKFEXeZXw3GbbIWUStVvXZayINtarI7E0UrnZPNYwx7yxbajs1ke\nqD4j\r\n=kcjn\r\n-----END PGP SIGNATURE-----\r\n"
  },
  "gitHead": "ee30a049ce083b23763341f849696166124218ce",
  "homepage": "https://github.com/xpl/get-source",
  "keywords": [
    "sources",
    "sourcemap",
    "read source",
    "cached sources"
  ],
  "license": "Unlicense",
  "main": "get-source",
  "maintainers": [
    {
      "name": "x84",
      "email": "igor.kroitor@gmail.com"
    },
    {
      "name": "xpl",
      "email": "rocket.mind@gmail.com"
    }
  ],
  "name": "get-source",
  "optionalDependencies": {},
  "readme": "# get-source\n\n[![Build Status](https://travis-ci.org/xpl/get-source.svg?branch=master)](https://travis-ci.org/xpl/get-source) [![Coverage Status](https://coveralls.io/repos/github/xpl/get-source/badge.svg)](https://coveralls.io/github/xpl/get-source) [![npm](https://img.shields.io/npm/v/get-source.svg)](https://npmjs.com/package/get-source)\n\nPlatform-agnostic source code inspection, with sourcemaps support.\n\n```bash\nnpm install get-source\n```\n\n## Features\n\n- [x] Allows to read source code files in Node and browsers\n- [x] Full sourcemap support (path resolving, external/embedded/inline linking, and long chains)\n- [x] **Synchronous** API — which is good when you implement a debugging tool (e.g. [logging](https://github.com/xpl/ololog))\n- [x] Built-in cache\n\n## What for\n\n- [x] Call stacks enhanced with source code information (see the [StackTracey](https://github.com/xpl/stacktracey) library)\n- [x] [Advanced logging](https://github.com/xpl/ololog) / assertion printing\n- [x] [Error displaying components](https://github.com/xpl/panic-overlay) for front-end web development\n\n## Usage\n\n```javascript\ngetSource = require ('get-source')\n```\n```javascript\nfile = getSource ('./scripts/index.min.js')\n```\n\nWill read the file synchronously (either via XHR or by filesystem API, depending on the environment) and return it's cached representation. Result will contain the following fields:\n\n```javascript\nfile.path  // normalized file path\nfile.text  // text contents\nfile.lines // array of lines\n```\n\nAnd the `resolve` method:\n\n```javascript\nfile.resolve ({ line: 1, column: 8 }) // indexes here start from 1 (by widely accepted convention). Zero indexes are invalid.\n```\n\nIt will look through the sourcemap chain, returning following:\n\n```javascript\n{\n   line:       <original line number>,\n   column:     <original column number>,\n   sourceFile: <original source file object>,\n   sourceLine: <original source line text>\n}\n```\n\nIn that returned object, `sourceFile` is the same kind of object that `getSource` returns. So you can access its `text`, `lines` and `path` fields to obtain the full information. And the `sourceLine` is returned just for the convenience, as a shortcut.\n\n## Error handling\n\n```javascript\nnonsense = getSource ('/some/nonexistent/file')\n\nnonsense.text  // should be '' (so it's safe to access without checking)\nnonsense.error // should be an Error object, representing an actual error thrown during reading/parsing\n```\n```javascript\nresolved = nonsense.resolve ({ line: 5, column: 0 })\n\nresolved.sourceLine // empty string (so it's safe to access without checking)\nresolved.error      // should be an Error object, representing an actual error thrown during reading/parsing\n```\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/xpl/get-source.git"
  },
  "scripts": {
    "coveralls": "nyc report --reporter=text-lcov | coveralls",
    "test": "nyc --reporter=html --reporter=text mocha test/test.path test/test.node --reporter spec",
    "test-browser": "mocha test/test.browser --reporter spec"
  },
  "version": "1.0.33"
}
