{"name":"babel-errors","version":"1.1.1","description":"Nicer error messages for Babel","main":"index.js","author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","files":[],"devDependencies":{"flow-bin":"^0.46.0"},"gitHead":"5816c884572e1c57d706ee5a41def51dbf48a626","_id":"babel-errors@1.1.1","scripts":{},"_shasum":"43f7142dd3b365633c758d155bffa3ba41523794","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"43f7142dd3b365633c758d155bffa3ba41523794","tarball":"http://registry-npm.ywwl.com/babel-errors/download/babel-errors-1.1.1.tgz","integrity":"sha512-tNDXOQWRfStz0RmuDSXXAjiU5UnB2b6/gH2qhCRr8JQDL4ePzT94O/YWsAuUFajEAJ9CMAd42tB3TQWL91Lnyw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfePD/Zf82KWRhvf/EagZaeCwfgIWUjN1vC37qpBrhXAIhAKVsif5ANcS5YJMoxzpI8IKo36SJPw+DrvHkzBytRcCL"}],"size":2458,"noattachment":false,"key":"/babel-errors/-/babel-errors-1.1.1.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-errors-1.1.1.tgz_1496101067904_0.41909541096538305"},"directories":{},"readme":"# babel-errors\n\n> Nicer error messages for Babel\n\n```js\nimport createBabelFile from 'babel-file';\nimport {BabelError, prettyError, buildCodeFrameError} from 'babel-errors';\n\nconst file = createBabelFile(...);\n\nlet path = file.path;\nlet {line, column} = path.loc.start;\n\nthrow prettyError(createErrorWithLoc('Error at this position', line, column));\nthrow buildCodeFrameError(path, 'Error with this Path');\n```\n\n### `createErrorWithLoc(message, line, column)`\n\nThis lets you add location information to your errors.\n\n### `wrapErrorWithCodeFrame(err)`\n\nYou can use this when capturing errors thrown by Babel or constructed using\n`createErrorWithLoc` to add a code frame when possible.\n\n### `buildCodeFrameError(path, message)`\n\nYou can use this to build a code frame error around a path with a specified\nmessage.\n\nUse this instead of `path.buildCodeFrameError` when you aren't running inside a\nBabel plugin.\n\n### `toErrorStack(error)`\n\nCreates string with error name, message, stack/code frame.\n","publish_time":1496101068047,"_cnpm_publish_time":1496101068047,"dist-tags":{"latest":"1.1.1"}}