{"id":17551102,"url":"https://github.com/maael/html-chain","last_synced_at":"2025-04-24T02:10:35.495Z","repository":{"id":35395742,"uuid":"39659772","full_name":"maael/html-chain","owner":"maael","description":":link: A super small javascript library to make html by chaining javascript functions","archived":false,"fork":false,"pushed_at":"2016-07-06T16:00:34.000Z","size":11,"stargazers_count":36,"open_issues_count":4,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-14T18:19:54.537Z","etag":null,"topics":["chaining-javascript-functions","html","html-chain","javascript","javascript-library"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maael.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-24T21:56:34.000Z","updated_at":"2024-08-30T02:26:03.000Z","dependencies_parsed_at":"2022-08-26T23:01:54.056Z","dependency_job_id":null,"html_url":"https://github.com/maael/html-chain","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maael%2Fhtml-chain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maael%2Fhtml-chain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maael%2Fhtml-chain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maael%2Fhtml-chain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maael","download_url":"https://codeload.github.com/maael/html-chain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250546086,"owners_count":21448260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chaining-javascript-functions","html","html-chain","javascript","javascript-library"],"created_at":"2024-10-21T04:44:52.476Z","updated_at":"2025-04-24T02:10:35.479Z","avatar_url":"https://github.com/maael.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# html-chain\n\n[![NPM Version](https://img.shields.io/npm/v/html-chain.svg?style=flat-square)](https://www.npmjs.com/package/html-chain)\n[![Build Status](https://img.shields.io/travis/maael/html-chain.svg?style=flat-square)](https://travis-ci.org/maael/html-chain)\n[![Code Climate](https://img.shields.io/codeclimate/github/maael/html-chain.svg?style=flat-square)](https://codeclimate.com/github/maael/html-chain)\n\nA super small (only 3.1kB) javascript library to make html by chaining javascript functions.\n\n## Example\n\n```js\nvar test = html()\n    .add('div', {className: 'container', data: { info: 'extraInformation' }})\n        .contains('div', {className: 'header'})\n            .contains('h5', {className: 'headerTitle', text: 'This is a header'}).end()\n        .and('div', {className: 'content'})\n            .contains('p', {text: 'This is the content'}).end()\n        .end()\n    .build();\n```\n\nProduces -\n\n```html\n\u003cdiv class=\"container\" data-info=\"extraInformation\"\u003e\n    \u003cdiv class=\"header\"\u003e\n        \u003ch5 class=\"headerTitle\"\u003eThis is a header\u003c/h5\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"content\"\u003e\n        \u003cp\u003eThis is the content\u003c/p\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\n## Installation\n\n### Node.js\n\nRun\n```npm install --save html-chain```\nYou can then access it with ```var html = require('html-chain');```\n\n### Script\n\nDownload and include the ```html.js``` script in your html.\n\n```\u003cscript type=\"text/javascript\" src=\"_PATH_TO_html.js_\"\u003e\u003c/script\u003e```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaael%2Fhtml-chain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaael%2Fhtml-chain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaael%2Fhtml-chain/lists"}