$ cnpm install vfile-sort
Sort vfile messages.
localeCompare
to compare source
, ruleId
, or finally
reason
This package is ESM only:
Node 12+ is needed to use it and it must be import
ed instead of require
d.
npm:
npm install vfile-sort
import {VFile} from 'vfile'
import {sort} from '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(d => String(d)))
// => ['2:2: Another!', '3:1: Error!']
This package exports the following identifiers: sort
.
There is no default export.
sort(file)
Sort messages in the given vfile.
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.
Copyright 2013 - present © cnpmjs.org