0.0.19 • Published 2 years ago

@acot/html-pickup v0.0.19

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@acot/html-pickup

Use the CSS Selector to pick up the elements from the HTML string.

Installation

Install via npm:

$ npm install --save @acot/html-pickup

Usage

T.B.A

import { pickup } from '@acot/html-pickup';

const html = `
<html>
  <body>
    <header>
      <h1>Title</h1>
    </header>

    <main id="container">
      <h2>Sub title</h2>
      <ul>
        <li>Item 1</li>
        <li>Item 2</li>
        <li>Item 3</li>
      </ul>
    </main>
  </body>
</html>
`;

const el = pickup(html, '#container');

console.log(el);
// "<main id="container"><h2>Sub title</h2><ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul></main>"
0.0.19

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.5-canary.0

3 years ago

0.0.5

3 years ago

0.0.4-canary.0

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.3-canary.0

3 years ago

0.0.2

3 years ago

0.0.2-canary.1

4 years ago

0.0.2-canary.0

4 years ago

0.0.1

4 years ago