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

tap-to-html

v1.1.2

Published

A Test-Anything-Protocol (tap) stream transformer to html

Downloads

38

Readme

tap-to-html

A Test-Anything-Protocol (tap) stream transformer to html

NPM NPM

NPM version NPM downloads Build status

Installation

npm install tap-to-html

Usage

Javascript

var tapToHtml = new require('tap-to-html').TapToHtml();
var tapToHtmlstream = tapToHtml.stream();

sourceStream.pipe(tapToHtmlstream).pipe(writeStream);

Typescript

import { TapToHtml } from 'tap-to-html';

const tapToHtml = new TapToHtml();

const tapToHtmlstream = tapToHtml.stream();
sourceStream.pipe(tapToHtmlstream).pipe(writeStream);

Example 1

input

TAP version 13
# testling.baseconfig_for_spec.ts
# get value
ok 1 has key buildtype
# testling.context.ts
# constructor
ok 2 cloudconfig
ok 3 keyspath
ok 4 workingpath
ok 60 device
ok 61 ebsSize
ok 62 ebsVolumeType
# testling.core.quhnb_docker.ts
# constructor
# testling.core.vpc_options.ts
# constructor
ok 63 vpcId
ok 64 securityGroupId

1..64
# tests 64
# pass  64

# ok

output

<!DOCTYPE html>
<html>
<head>
    <title>Tap To Html</title>
    <link rel="stylesheet" href="bootstrap.min.css">
    <script src="jquery.min.js"></script>
    <script src="bootstrap.min.js"></script>
    <style>
        .error {
            background-color: #ff0000;
            color: #ffffff;
            font-size: 24px;
            font-weight: bold;
        }
        .ok {
            background-color: #71eb3d;
        }
        .errorbody {
            background-color: #ff0000;
        }
        .okbody {
            background-color: #00ff00;
        }
        .container {
            background-color: #ffffff;
            margin-top: 40px;
        }
        h3 {
            font-family: "Times New Roman";
            font-size: 20px;
        }
        p {
            font-family: "Courier New";
            font-size: 20px;
        }
        .yaml {
            background-color: #f8dada;
            font-size: 20px;
        }  
        .toprow {
            height: 10px;
        }  
        .summary {
            margin: 20px;            
        }  
        span.label {
             font-size: 20px;             
        }   
    </style>
    <script>
        $(document).ready(function () {
            setInterval(function () {
                location.reload();
            }, 4000);
        });
    </script>
</head>
<body class="okbody">
    <div class="container">
        <div class="row toprow">
        </div>
        <div class="row">
            <div class="col-md-2">
                <span class="label label-default">Tests 64</span>  
            </div>
            <div class="col-md-2">
                <span class="label label-success">Pass 64</span>                        
            </div>
            <div class="col-md-2">
                <span class="label label-danger">Fail 0</span>
            </div>
            <div class="col-md-6">7:36:02 AM
            </div>
        </div>
        <div class="row summary">
           
        </div>
        <div class="row">
           <br>
<p># testling.baseconfig_for_spec.ts</p>
<p># get value</p>
<p class="ok">ok 1 has key buildtype</p>
<p># testling.context.ts</p>
<p># constructor</p>
<p class="ok">ok 2 cloudconfig</p>
<p class="ok">ok 3 keyspath</p>
<p class="ok">ok 4 workingpath</p>
<p class="ok">ok 60 device</p>
<p class="ok">ok 61 ebsSize</p>
<p class="ok">ok 62 ebsVolumeType</p>
<p># testling.core.quhnb_docker.ts</p>
<p># constructor</p>
<p># testling.core.vpc_options.ts</p>
<p># constructor</p>
<p class="ok">ok 63 vpcId</p>
<p class="ok">ok 64 securityGroupId</p>
<br>
<p># tests 64</p>
<p># pass  64</p>
<br>
<p># ok</p>
<br>
        </div>
    </div>
</body>
</html>

Example1

Example 2

input

TAP version 13
# testling.core.ebs_options.ts
# constructor
ok 57 machineName
ok 62 ebsVolumeType
# testling.core.quhnb_docker.ts
# constructor
# testling.core.vpc_options.ts
# constructor
not ok 63 vpcId
  ---
    operator: equal
    expected: 'vpc id2'
    actual:   'vpc id'
  ...
ok 64 securityGroupId

1..64
# tests 64
# pass  63
# fail  1

output


<!DOCTYPE html>
<html>
<head>
    <title>Tap To Html</title>
    <link rel="stylesheet" href="bootstrap.min.css">
    <script src="jquery.min.js"></script>
    <script src="bootstrap.min.js"></script>
    <style>
        .error {
            background-color: #ff0000;
            color: #ffffff;
            font-size: 24px;
            font-weight: bold;
        }
        .ok {
            background-color: #71eb3d;
        }
        .errorbody {
            background-color: #ff0000;
        }
        .okbody {
            background-color: #00ff00;
        }
        .container {
            background-color: #ffffff;
            margin-top: 40px;
        }
        h3 {
            font-family: "Times New Roman";
            font-size: 20px;
        }
        p {
            font-family: "Courier New";
            font-size: 20px;
        }
        .yaml {
            background-color: #f8dada;
            font-size: 20px;
        }  
        .toprow {
            height: 10px;
        }  
        .summary {
            margin: 20px;            
        }  
        span.label {
             font-size: 20px;             
        }   
    </style>
    <script>
        $(document).ready(function () {
            setInterval(function () {
                location.reload();
            }, 4000);
        });
    </script>
</head>
<body class="errorbody">
    <div class="container">
        <div class="row toprow">
        </div>
        <div class="row">
            <div class="col-md-2">
                <span class="label label-default">Tests 64</span>  
            </div>
            <div class="col-md-2">
                <span class="label label-success">Pass 63</span>                        
            </div>
            <div class="col-md-2">
                <span class="label label-danger">Fail 1</span>
            </div>
            <div class="col-md-6">7:40:50 AM
            </div>
        </div>
        <div class="row summary">
           <p class="error"># testling.core.quhnb_docker.ts# constructor# testling.core.vpc_options.ts# constructor</p><p class="error">not ok 63 vpcId</p>
<pre class="yaml">
  ---
    operator: equal
    expected: 'vpc id2'
    actual:   'vpc id'
  ...
</pre>
        </div>
        <div class="row">
           <br>
<p># testling.core.ebs_options.ts</p>
<p># constructor</p>
<p class="ok">ok 57 machineName</p>
<p class="ok">ok 62 ebsVolumeType</p>
<p># testling.core.quhnb_docker.ts</p>
<p># constructor</p>
<p># testling.core.vpc_options.ts</p>
<p># constructor</p>
<p class="error"># testling.core.quhnb_docker.ts# constructor# testling.core.vpc_options.ts# constructor</p><p class="error">not ok 63 vpcId</p>
<pre class="yaml">
  ---
    operator: equal
    expected: 'vpc id2'
    actual:   'vpc id'
  ...
</pre>
<p class="ok">ok 64 securityGroupId</p>
<br>
<p># tests 64</p>
<p># pass  63</p>
<p># fail  1</p>
<br>
        </div>
    </div>
</body>
</html>

Example2

License

MIT