Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tbeseda/html-skelly

Create a plain text representation of an HTML document's skeleton. Great for logging.
https://github.com/tbeseda/html-skelly

Last synced: about 1 month ago
JSON representation

Create a plain text representation of an HTML document's skeleton. Great for logging.

Awesome Lists containing this project

README

        


html-skelly ๐Ÿฉป


Create a plain text representation of an HTML document's skeleton. Great for logging.

html-skelly on npmjs.org ยป

## Usage

```
npm i html-skelly
```

Get some HTML and create a skelly. Tags will be represented by their name + id + class. Kinda like a CSS selector.

`` becomes ``

```javascript
import skelly from 'html-skelly'

const response = await fetch(`https://google.com`)
const html = await response.text()

console.log(skelly('๐Ÿ’€ Google Skelly', html))
console.log(skelly('Google Skelly', html, { flare: false })) // without ANSI/emoji
```

Output (it looks better in a terminal with color support):

```txt
โ”Œโ”€ ๐Ÿ’€ Google Skelly ๐Ÿฉป โ”€โ—‹
โ”‚
โ”‚
โ”‚
โ”‚
โ”‚
โ”‚
โ”‚
โ”‚
โ”‚ <f>
โ”‚ <style>
โ”‚ <style>
โ”‚ <script>
โ”‚ <g>
โ”‚ <body>
โ”‚ <script>
โ”‚ <div#mngb>
โ”‚ <div>
โ”‚ <nobr>
โ”‚ <b>
โ”‚ <a>
โ”‚ <a>
โ”‚ <a>
โ”‚ <a>
โ”‚ <a>
โ”‚ <a>
โ”‚ <a>
โ”‚ <a>
โ”‚ <u>
โ”‚ <div>
โ”‚ <nobr>
โ”‚ <span>
โ”‚ <span>
โ”‚ <span>
โ”‚ <a>
โ”‚ <a>
โ”‚ <a>
โ”‚ <div>
โ”‚ <div>
โ”‚ <center>
โ”‚ <br#lgpd>
โ”‚ <div#lga>
โ”‚ <img#hplogo>
โ”‚ <br>
โ”‚ <br>
โ”‚ <form>
โ”‚ <table>
โ”‚ <tr>
โ”‚ <td>
โ”‚ <td>
โ”‚ <input>
โ”‚ <input>
โ”‚ <input>
โ”‚ <input>
โ”‚ <input>
โ”‚ <div.ds>
โ”‚ <input.lst>
โ”‚ <br>
โ”‚ <span.ds>
โ”‚ <span.lsbb>
โ”‚ <input.lsb>
โ”‚ <span.ds>
โ”‚ <span.lsbb>
โ”‚ <input#tsuid_1.lsb>
โ”‚ <script>
โ”‚ <input>
โ”‚ <td.fl.sblc>
โ”‚ <a>
โ”‚ <input#gbv>
โ”‚ <script>
โ”‚ <div#gac_scont>
โ”‚ <div>
โ”‚ <br>
โ”‚ <span#footer>
โ”‚ <div>
โ”‚ <div#WqQANb>
โ”‚ <a>
โ”‚ <a>
โ”‚ <a>
โ”‚ <p>
โ”‚ <a>
โ”‚ <a>
โ”‚ <script>
โ”‚ <k>
โ”‚ <script>
โ”‚ <script>
โ”‚ <amd>
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ—
```