Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/tbeseda/html-skelly
- Owner: tbeseda
- License: mit
- Created: 2024-02-17T21:10:06.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-19T01:12:08.000Z (about 1 year ago)
- Last Synced: 2024-11-10T15:50:55.173Z (3 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/html-skelly
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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>
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```