GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - maael/html-chain: :link: A super small javascript library to make html by chaining javascript functions

BranchesTags
Open more actions menu

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
test
test
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
html.js
html.js
 
 
module.js
module.js
 
 
package.json
package.json
 
 

Repository files navigation

html-chain

NPM Version Build Status Code Climate

A super small (only 3.1kB) javascript library to make html by chaining javascript functions.

Example

var test = html()
    .add('div', {className: 'container', data: { info: 'extraInformation' }})
        .contains('div', {className: 'header'})
            .contains('h5', {className: 'headerTitle', text: 'This is a header'}).end()
        .and('div', {className: 'content'})
            .contains('p', {text: 'This is the content'}).end()
        .end()
    .build();

Produces -

<div class="container" data-info="extraInformation">
    <div class="header">
        <h5 class="headerTitle">This is a header</h5>
    </div>
    <div class="content">
        <p>This is the content</p>
    </div>
</div>

Installation

Node.js

Run npm install --save html-chain You can then access it with var html = require('html-chain');

Script

Download and include the html.js script in your html.

<script type="text/javascript" src="_PATH_TO_html.js_"></script>

About

🔗 A super small javascript library to make html by chaining javascript functions

Topics

chaining-javascript-functionshtmlhtml-chainjavascriptjavascript-library

Resources

Readme
MIT license
Activity

Stars

37 stars

Watchers

4 watching

Forks

4 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.