Socket
Socket
Sign inDemoInstall

builder

Package Overview
Dependencies
Maintainers
0
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

builder - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

package.json
{
"name": "builder",
"description": "Liberal JavaScript DOM builder",
"version": "1.0.0",
"version": "1.0.1",
"url": "https://github.com/syntacticx/builder/",
"homepage": "https://github.com/syntacticx/builder/",
"author": "Ryan Eastridge <ryan@syntacticx.com>",

@@ -6,0 +8,0 @@ "licenses": [{

@@ -5,5 +5,7 @@ Builder

Builder(tag_name, attributes = {}, elements = [], content = '', callback)
npm install builder
element = Builder(tag_name, attributes = {}, elements = [], content = '', callback)
-------
Generate a DOM Element. Accepts a variable number of arguments which may be:
Accepts a variable number of arguments which may be:

@@ -14,9 +16,11 @@ - Hashes of attributes

- Arrays (which can be nested) of any of the above
- Function to call, which should return any of the above
- Function to call, which can return any of the above
div = Builder 'div', className: 'tasty'
All HTML5 tag names are available as functions on the Builder object which will generate the corresponding element. For maximum readability when generating multiple elements it can be useful to call a function with Builder as the context.
# using Builder
div = Builder 'div', className: 'tasty'
ul = Builder.ul Builder.li 'Item One'
All HTML5 tag names are available as functions on the Builder object which will generate the corresponding element. For maximum readability when generating multiple elements it can be useful to a function with Builder as the context:
# calling a function with Builder as the context
table = (->

@@ -23,0 +27,0 @@ @table cellpadding: 0, cellspacing: 0,

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