mock-html-from-css
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Usage

Install the package with

npm install mock-html-from-css

Then it can be used globally with the following command

import { mockHtmlFromCss } from 'mock-html-from-css';

mockHtmlFromCss('div.#someRandomId.class1.class2 > span[value="open"]')

Which will return the following code as an HTML element. The parent element defaults to a div, unless specified

<div>
    <div class="class1 class2" id="someRandomId">
        <span value="open"></span>
    </div>
</div>

/mock-html-from-css/

    Package Sidebar

    Install

    npm i mock-html-from-css

    Weekly Downloads

    2

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    3.34 kB

    Total Files

    4

    Last publish

    Collaborators

    • agustingrm