Socket
Socket
Sign inDemoInstall

vfile-sort

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vfile-sort

Sort VFile messages by line/column


Version published
Maintainers
1
Install size
5.81 kB
Created

Readme

Source

vfile-sort Build Status Coverage Status

Sorts VFile messages.

Installation

npm:

npm install vfile-sort

vfile-sort is also available for bower, component, and duo, and as an AMD, CommonJS, and globals module, uncompressed and compressed.

Usage

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

var file = vfile();

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

file.warn('Another!', {
    'line': 2,
    'column': 2
});

sort(file);

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

API

sort(vfile)

Sorts messages in the given VFile.

License

MIT © Titus Wormer

Keywords

FAQs

Last updated on 16 Aug 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc