Gathering detailed insights and metrics for vfile-sort
Gathering detailed insights and metrics for vfile-sort
Gathering detailed insights and metrics for vfile-sort
Gathering detailed insights and metrics for vfile-sort
npm install vfile-sort
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
5 Stars
94 Commits
3 Forks
7 Watchers
1 Branches
10 Contributors
Updated on May 05, 2024
Latest Version
4.0.0
Package Id
vfile-sort@4.0.0
Unpacked Size
11.99 kB
Size
4.13 kB
File Count
7
NPM Version
9.6.4
Node Version
20.0.0
Published on
Jun 10, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
vfile
utility to sort files or messages.
This package exposes comparators for vfile files and messages.
You can use this right before a reporter is used to give humans a coherent report.
This package is ESM only. In Node.js (version 16+), install with npm:
1npm install vfile-sort
In Deno with esm.sh
:
1import {sort} from 'https://esm.sh/vfile-sort@4'
In browsers with esm.sh
:
1<script type="module"> 2 import {sort} from 'https://esm.sh/vfile-sort@4?bundle' 3</script>
1import {VFile} from 'vfile' 2import {VFileMessage} from 'vfile-message' 3import {compareFile, compareMessage} from 'vfile-sort' 4 5console.log( 6 [ 7 new VFileMessage('Error!', {place: {line: 3, column: 1}}), 8 new VFileMessage('Another!', {place: {line: 2, column: 2}}) 9 ] 10 .toSorted(compareMessage) 11 .map(String) 12) //=> ['2:2: Another!', '3:1: Error!'] 13 14console.log( 15 [ 16 new VFile(new URL(import.meta.url)), 17 new VFile(new URL('.', import.meta.url)) 18 ] 19 .toSorted(compareFile) 20 .map((d) => d.path) 21) //=> ['/Users/tilde/Projects/oss/vfile-sort/', '/Users/tilde/Projects/oss/vfile-sort/example.js']
This package exports the identifiers compareFile
and
compareMessage
.
There is no default export.
compareFile(a, b)
Compare files (since: 4.0.0
).
Order (number
).
compareMessage(a, b)
Compare messages (since: 4.0.0
).
It first sorts by line/column: earlier messages come first.
When two messages occurr at the same place, sorts fatal error before
warnings, before info messages.
Finally, it sorts using localeCompare
on source
, ruleId
, or finally
reason
.
Order (number
).
This package is fully typed with TypeScript. It exports no additional types.
Projects maintained by the unified collective are compatible with maintained versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line, vfile-sort@^4
,
compatible with Node.js 16.
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.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More