parse-flow-error-position.js
Parse the error position from Flow error message
;/*=> { file: '/foo/bar.js', startLine: 8, startCol: 5, endLine: 10, endCol: 1, type: 'object literal' } */
Installation
Package managers
npm
npm install parse-flow-error-position
Bower
bower install parse-flow-error-position
Duo
var parseFlowErrorPosition = ;
Standalone
Download the script file directly.
AMD support
This repository includes the AMD-friendly build but the package managers doesn't include it. If you want to use it, download it directly.
API
parseFlowErrorPosition(string)
string: String
Return: Object
It takes a line of the error-position information Flow produces, and returns an object which has the following properties:
file
startLine
startCol
endLine
endCol
type
;/*=> { file: '/foo/bar.js', startLine: 124, startCol: 5, endLine: 124, endCol: 11, type: 'string' } */
License
Copyright (c) 2014 Shinnosuke Watanabe
Licensed under the MIT License.