New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

andes

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

andes

A library to unflatten HTML markup to greatly facilitate styling

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by16.67%
Maintainers
1
Weekly downloads
 
Created
Source

andes Build Status

Shallow nested HTML documents often limit styling options. andes unflatten HTML documents and generate the minimum amount of wrapper elements to enable infinite styling options.

npm install --save andes

Usage

const andes = require('andes');
const html = '<h1>Heading</h1><p>Lorem ipsum dolore</p>';
andes(html);

Example

andes will turn this document

<h1>First heading 1</h1>
<img src="/image.png" />
<h1>Second heading 1</h1>
<h2>First Heading 2</h2>
<p>Lorem ipsum</p>
<h2>Second Heading 2</h2>
<p>Lorem ipsum</p>

Into this one

<article class='article-h1i'>
  <section class='container-h1'>
    <h1>First heading 1</h1>
    <div class='img' style='background-image: url(/image.png)'></div>
    <div class='content-h1'></div>
  </section>
</article>
<article class='article-h1h2xh2x'>
  <section class='container-h1'>
    <h1>Second heading 1</h1>
    <div class='content-h1'>
      <section class='container-h2'>
        <h2>First Heading 2</h2>
        <div class='content-h2'>
          <p>Lorem ipsum</p>
        </div>
      </section>
      <section class='container-h2'>
        <h2>Second Heading 2</h2>
        <div class='content-h2'>
          <p>Lorem ipsum</p>
        </div>
      </section>
    </div>
  </section>
</article>

Keywords

FAQs

Package last updated on 10 Jul 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc