{"_id":"babel-errors","_rev":"319428","name":"babel-errors","description":"Nicer error messages for Babel","dist-tags":{"latest":"1.1.1"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"time":{"modified":"2021-06-03T20:13:08.000Z","created":"2017-05-17T02:30:04.823Z","1.1.1":"2017-05-29T23:37:48.047Z","1.1.0":"2017-05-27T03:31:37.952Z","1.0.1":"2017-05-25T12:02:49.031Z","1.0.0":"2017-05-17T02:30:04.823Z"},"users":{},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"versions":{"1.1.1":{"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","size":2458,"noattachment":false,"key":"/babel-errors/-/babel-errors-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-errors/download/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":{},"publish_time":1496101068047,"_cnpm_publish_time":1496101068047,"_hasShrinkwrap":false},"1.1.0":{"name":"babel-errors","version":"1.1.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":"4764605d8446a4a2c15a78f2c6f7c7b51212c2ed","_id":"babel-errors@1.1.0","scripts":{},"_shasum":"8cdd3754d750a480b8a26e0bc17f5e490926b36c","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"8cdd3754d750a480b8a26e0bc17f5e490926b36c","size":2906,"noattachment":false,"key":"/babel-errors/-/babel-errors-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-errors/download/babel-errors-1.1.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-errors-1.1.0.tgz_1495855897753_0.45476756733842194"},"directories":{},"publish_time":1495855897952,"_hasShrinkwrap":false,"_cnpm_publish_time":1495855897952},"1.0.1":{"name":"babel-errors","version":"1.0.1","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":"1d81789eaab3161c1fbeae9e620393955a4df9ee","_id":"babel-errors@1.0.1","scripts":{},"_shasum":"f042994ab44bb7fd2d310b8807422b0256d195a3","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"f042994ab44bb7fd2d310b8807422b0256d195a3","size":2779,"noattachment":false,"key":"/babel-errors/-/babel-errors-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-errors/download/babel-errors-1.0.1.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-errors-1.0.1.tgz_1495713768781_0.8325845224317163"},"directories":{},"publish_time":1495713769031,"_hasShrinkwrap":false,"_cnpm_publish_time":1495713769031},"1.0.0":{"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","size":2750,"noattachment":false,"key":"/babel-errors/-/babel-errors-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-errors/download/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":{},"publish_time":1494988204823,"_hasShrinkwrap":false,"_cnpm_publish_time":1494988204823}},"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","_attachments":{},"license":"MIT"}