{"name":"babel-errors","version":"1.0.0","description":"Nicer error messages for Babel","main":"index.js","author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","devDependencies":{"flow-bin":"^0.46.0"},"gitHead":"f7b722fe7863a2a77054ae9eb18bb481a0fae074","_id":"babel-errors@1.0.0","scripts":{},"_shasum":"3fc5644ae8456ec19fd0310debdec2752dcf35e8","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"3fc5644ae8456ec19fd0310debdec2752dcf35e8","tarball":"http://registry-npm.ywwl.com/babel-errors/download/babel-errors-1.0.0.tgz","integrity":"sha512-jQu9P/Z3gGoWWADBbhy1JH1ORvKNH6T9XlX9FlcdAB0a+sMO1rZnkfSouph8WnYMGc3n1mZdKt2ZtoJ2TJ8jqA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDRRe5EewrT9baVAxstbfkHEaybzE+YU1iDs4zd98ntgIgJqdnVGiHkQnN+k3mKB51S10Cmthjuy+tWq4T28W5YBA="}],"size":2750,"noattachment":false,"key":"/babel-errors/-/babel-errors-1.0.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/babel-errors-1.0.0.tgz_1494988204600_0.44404893345199525"},"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":1494988204823,"_cnpm_publish_time":1494988204823,"dist-tags":{"latest":"1.1.1"}}