unified

Project:vfile/vfile-sort

Package:vfile-sort@2.2.2

  1. Dependencies:0·Dependents:19
  2. vfile utility to sort messages by line/column
  1. util 105
  2. utility 105
  3. file 24
  4. virtual 21
  5. vfile 17
  6. vfile-util 16
  7. message 8
  8. sort 3

vfile-sort

Build Coverage Downloads Size Sponsors Backers Chat

Sort vfile messages.

Install

npm:

npm install vfile-sort

Use

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.

Contribute

See contributing.md in vfile/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Titus Wormer