npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ta11y/reporter

v1.3.1

Published

Output reporters for ta11y audit results.

Downloads

6

Readme

@ta11y/reporter

Output reporters for ta11y audit results.

NPM Build Status JavaScript Style Guide

Install

npm install --save @ta11y/reporter

Usage

The easiest way to use this package is to use the CLI.

const { audit } = require('@ta11y/core')
const { formatAuditResults } = require('@ta11y/reporter')

audit('https://en.wikipedia.org')
  .then((auditResults) => {
    // overview of results (number of urls visited, success, error)
    console.log(auditResults.summary)

    // save the results to an excel spreadsheet
    return formatAuditResults(auditResults, 'out.xls')
  })

Formats

We support all output formats supported by SheetJS.

| file type | file ext | container | sheets | Description | | :-------- | -------: | :-------: | :----- | :------------------------------ | | xlsx | .xlsx | ZIP | multi | Excel 2007+ XML Format | | xlsm | .xlsm | ZIP | multi | Excel 2007+ Macro XML Format | | xlsb | .xlsb | ZIP | multi | Excel 2007+ Binary Format | | biff8 | .xls | CFB | multi | Excel 97-2004 Workbook Format | | biff5 | .xls | CFB | multi | Excel 5.0/95 Workbook Format | | biff2 | .xls | none | single | Excel 2.0 Worksheet Format | | xlml | .xls | none | multi | Excel 2003-2004 (SpreadsheetML) | | ods | .ods | ZIP | multi | OpenDocument Spreadsheet | | fods | .fods | none | multi | Flat OpenDocument Spreadsheet | | csv | .csv | none | single | Comma Separated Values | | txt | .txt | none | single | UTF-16 Unicode Text (TXT) | | sylk | .sylk | none | single | Symbolic Link (SYLK) | | html | .html | none | single | HTML Document | | dif | .dif | none | single | Data Interchange Format (DIF) | | dbf | .dbf | none | single | dBASE II + VFP Extensions (DBF) | | rtf | .rtf | none | single | Rich Text Format (RTF) | | prn | .prn | none | single | Lotus Formatted Text | | eth | .eth | none | single | Ethercalc Record Format (ETH) |

API

formatAuditResults

Formats and outputs the given audit results from @ta11y/core, optionally writing them to a file.

If no options / filename is passed, the input will be returned untransformed.

Type: function (auditResults, opts): Promise

  • auditResults object JSON audit results to format.
  • opts (object | string)? Filename to write or config options.
    • opts.file string? Filename to write.
    • opts.format string? File format to use (by default this is inferred from the filename).
    • opts.encoding string? File encoding to use (by default this is inferred from the file format).

formatExtractResults

Formats and outputs the given extraction results from @ta11y/extract, optionally writing them to a file.

If no options / filename is passed, the input will be returned untransformed.

Type: function (extractResults, opts, auditResults): Promise

  • extractResults
  • opts (object | string)? Filename to write or config options.
    • opts.file string? Filename to write.
    • opts.format string? File format to use (by default this is inferred from the filename).
    • opts.encoding string? File encoding to use (by default this is inferred from the file format).
  • auditResults object JSON audit results to format.

License

MIT © Saasify