Comparing version 1.0.0 to 1.0.1
{ | ||
"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, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
15723
57