Skip to content

utility to sort messages by line/column

License

Notifications You must be signed in to change notification settings

vfile/vfile-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vfile-sort Build Status Coverage Status

Sort vfile messages by line/column.

Installation

npm:

npm install vfile-sort

Usage

var vfile = require('vfile');
var sort = require('vfile-sort');

var file = vfile();

file.message('Error!', {line: 3, column: 1});
file.message('Another!', {line: 2, column: 2});

sort(file);

console.log(file.messages.map(String));
//=> ['2:2: Another!', '3:1: Error!']

API

sort(file)

Sort messages in the given vfile.

License

MIT © Titus Wormer