{"_id":"domo","_rev":"39-c414af883164e5bd9cf3d0a83e78f92f","name":"domo","dist-tags":{"latest":"0.5.9"},"versions":{"0.3.0":{"name":"domo","version":"0.3.0","keywords":["dom","template","browser"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.3.0","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"9cd269424ca4a57192b8dfbb04557106195f6c43","tarball":"https://registry.npmjs.org/domo/-/domo-0.3.0.tgz","integrity":"sha512-FNZlhyNtroFh1aKn21ZCOKFms2TiWnZBGg0ZUIr9uGEYJsY1jfUfMuPQIelfn9wtYmrQMRpSsm5dHBnI7JIJCA==","signatures":[{"sig":"MEUCIQDB88eNMHLh0ZjpBW7szswfuxqa4uTwLIEfZCEM3wO39wIgEVe/KVOakQC1fpd0s/a64zvBpT+UgCBhlldz44gEPIE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"domo.js","readme":"domo\n=====\n\ndomo is a DSL (DOM-specific language) that unifies HTML markup and CSS style into JavaScript syntax, by providing global functions for HTML5 elements and CSS declarations. To see it in action, head over to [JSBin](http://jsbin.com/egapim/1/edit). Available [here](https://raw.github.com/jed/domo/master/domo.js) or on [npm](https://npmjs.org/package/domo).\n\nFeatures\n--------\n\n- Most of what you'd want from HAML or LESS, in pure JavaScript.\n- Small, dependency-free footprint (around 1KB minizipped).\n- Straight from JS to DOM without HTML reduces XSS attack vectors.\n- Sugars well with (but completely agnostic to) CoffeeScript.\n\nNot convinced? Read a [more detailed pitch](https://gist.github.com/3916350).\n\nExample\n-------\n\n```html\n<!doctype html>\n<script>\n  document.replaceChild(\n\n  HTML({lang: \"en\"},\n    HEAD(\n      TITLE(\"Hello, world\"),\n      STYLE({type: \"text/css\"},\n        CSS(\"#container\",\n          {backgroundColor: \"#eee\"},\n          roundedCorners(5)\n        )\n      )\n    ),\n\n    BODY(\n      DIV({id: \"container\"},\n        \"For more details about domo, see the source: \",\n        A({href: \"//github.com/jed/domo/blob/master/domo.js\"}, \"View source\")\n      )\n    )\n  )\n\n  , document.documentElement)\n\n  function roundedCorners(radius) {\n    return {\n      borderRadius       : radius,\n      WebkitBorderRadius : radius,\n      MozBorderRadius    : radius\n    }\n  }\n</script>\n```\n\nAPI\n---\n\ndomo provides functions for CSS rules and HTML5 element types, allowing you to create DOM objects anywhere in your code without compiling templates from separate `script` tags.\n\n### domo.noConflict()\n\nBy default, domo extends the global object (`window` in the browser or `global` in node) with itself and all of its DOM/CSS functions. This allows you to access them directly, and write code that behaves like a DSL, but without any compilation step.\n\nIf polluting the global namespace isn't your style, you can call `domo.noConflict()`. This function restores all overwritten global object properties and returns the original namespace, much like its jQuery namesake.\n\n### domo.<element-name>([<attributes>], [<childNodes>...])\n\nThis returns a new DOM element of the specified name, with the optionally specified attributes, and child nodes.\n\n*element* can be any of the following valid HTML5 tag names: `A`, `ABBR`, `ACRONYM`, `ADDRESS`, `AREA`, `ARTICLE`, `ASIDE`, `AUDIO`, `B`, `BDI`, `BDO`, `BIG`, `BLOCKQUOTE`, `BODY`, `BR`, `BUTTON`, `CANVAS`, `CAPTION`, `CITE`, `CODE`, `COL`, `COLGROUP`, `COMMAND`, `DATALIST`, `DD`, `DEL`, `DETAILS`, `DFN`, `DIV`, `DL`, `DT`, `EM`, `EMBED`, `FIELDSET`, `FIGCAPTION`, `FIGURE`, `FOOTER`, `FORM`, `FRAME`, `FRAMESET`, `H1`, `H2`, `H3`, `H4`, `H5`, `H6`, `HEAD`, `HEADER`, `HGROUP`, `HR`, `HTML`, `I`, `IFRAME`, `IMG`, `INPUT`, `INS`, `KBD`, `KEYGEN`, `LABEL`, `LEGEND`, `LI`, `LINK`, `MAP`, `MARK`, `META`, `METER`, `NAV`, `NOSCRIPT`, `OBJECT`, `OL`, `OPTGROUP`, `OPTION`, `OUTPUT`, `P`, `PARAM`, `PRE`, `PROGRESS`, `Q`, `RP`, `RT`, `RUBY`, `SAMP`, `SCRIPT`, `SECTION`, `SELECT`, `SMALL`, `SOURCE`, `SPAN`, `SPLIT`, `STRONG`, `STYLE`, `SUB`, `SUMMARY`, `SUP`, `TABLE`, `TBODY`, `TD`, `TEXTAREA`, `TFOOT`, `TH`, `THEAD`, `TIME`, `TITLE`, `TR`, `TRACK`, `TT`, `UL`, `VAR`, `VIDEO`, or `WBR`.\n\nThe first argument is an optional attributes object, mapping camelCased attribute names to attribute values.\n\nAll subsequent arguments are optional and appended as child nodes, merging any array arguments. Each child is appended as is if it's already a node (has a `nodeType` property), or converted to a text node otherwise. This allows you to append any DOM node generated elsewhere.\n\n### domo.CSS(<selector>, [<properties>...])\n\nThis returns a CSS rule string with the specified selector and properties, for use in a stylesheet.\n\nThe first argument is a required string representing the CSS selector.\n\nAll subsequent arguments are optional objects mapping property names to property values. camelCased property names are converted to lower-case hyphenated names, and number values converted to pixels.\n\nMultiple arguments are merged into a single property list, giving you two of the benefits of using a CSS pre-processor like LESS:\n\n#### 1. Rules can be nested with child rules, so that the following are identical:\n\n```javascript\nSTYLE({type: \"text/css\"},\n  CSS(\"a\", {color: \"red\"},\n    CSS(\"img\", {borderWidth: 0})\n  )\n)\n```\n\n```javascript\nSTYLE({type: \"text/css\"},\n  CSS(\"a\", {color: \"red\"}),\n  CSS(\"a img\", {borderWidth: 0})\n)\n```\n\n#### 2. Plain functions can be used as mix-ins, to minimize common CSS repetition:\n\n```javascript\nfunction roundedCorners(radius) {\n  return {\n    borderRadius       : radius,\n    WebkitBorderRadius : radius,\n    MozBorderRadius    : radius\n  }\n}\n\nSTYLE({type: \"text/css\"},\n  CSS(\"h1\", roundedCorners(10)),\n  CSS(\"h2\", roundedCorners(5))\n)\n```\n","_npmUser":{"name":"jed","email":"tr@nslator.jp"},"repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.1.62","description":"DOM library that unifies markup and style into JavaScript syntax","directories":{}},"0.4.0":{"name":"domo","version":"0.4.0","keywords":["dom","template","browser"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.4.0","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"1f0d1abd9081bddb59cf428df9fb238d69604447","tarball":"https://registry.npmjs.org/domo/-/domo-0.4.0.tgz","integrity":"sha512-3x7EAgwIj/0Wtm1lzPNFQRtK37zX+ysU/VwwUcrIFUAdRFx+51eKaCFxTgkfcfnumVUGBa7/q4vl/4Bz6LnOOQ==","signatures":[{"sig":"MEUCICNYe0HaXtmHDDmUnw9ZW5CpsXU56hmqUcf1Lh+6bZwWAiEA4JZuUlNZe82G1U66/M0mpC01YvsMzGnbEwHzL/EpU+4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","readme":"domo\n=====\n\ndomo is a DSL (DOM-specific language) that unifies HTML markup and CSS style into JavaScript syntax, by providing global functions for HTML5 elements and CSS declarations. To see it in action, head over to [JSBin](http://jsbin.com/egapim/46/edit). Available [here](https://raw.github.com/jed/domo/master/domo.js) or on [npm](https://npmjs.org/package/domo).\n\nFeatures\n--------\n\n- Most of what you'd want from HAML or LESS, in pure JavaScript.\n- Small, dependency-free footprint (around 1KB minizipped).\n- Straight from JS to DOM without HTML reduces XSS attack vectors.\n- Sugars well with (but completely agnostic to) CoffeeScript.\n\nNot convinced? Read a [more detailed pitch](https://gist.github.com/3916350).\n\nExample\n-------\n\n```html\n<!doctype html>\n<script>\n  HTML({lang: \"en\"},\n    HEAD(\n      TITLE(\"Hello, world\"),\n      STYLE({type: \"text/css\"},\n        CSS(\"#container\",\n          {backgroundColor: \"#eee\"},\n          roundedCorners(5)\n        )\n      )\n    ),\n\n    BODY(\n      DIV({id: \"container\"},\n        \"For more details about domo, see the source: \",\n        A({href: \"//github.com/jed/domo/blob/master/domo.js\"}, \"View source\")\n      )\n    )\n  )\n\n  function roundedCorners(radius) {\n    return {\n      borderRadius       : radius,\n      WebkitBorderRadius : radius,\n      MozBorderRadius    : radius\n    }\n  }\n</script>\n```\n\nAPI\n---\n\ndomo provides functions for CSS rules and HTML5 element types, allowing you to create DOM objects anywhere in your code without compiling templates from separate `script` tags.\n\n### domo.noConflict()\n\nBy default, domo extends the global object (`window` in the browser or `global` in node) with itself and all of its DOM/CSS functions. This allows you to access them directly, and write code that behaves like a DSL, but without any compilation step.\n\nIf polluting the global namespace isn't your style, you can call `domo.noConflict()`. This function restores all overwritten global object properties and returns the original namespace, much like its jQuery namesake.\n\n### domo.{element-name}([{attributes}], [{childNodes}...])\n\nThis returns a new DOM element of the specified name, with the optionally specified attributes, and child nodes. If the element name is `HTML`, the current document element will also be replaced with the returned element.\n\n*element* can be any of the following valid HTML5 tag names: `A`, `ABBR`, `ACRONYM`, `ADDRESS`, `AREA`, `ARTICLE`, `ASIDE`, `AUDIO`, `B`, `BDI`, `BDO`, `BIG`, `BLOCKQUOTE`, `BODY`, `BR`, `BUTTON`, `CANVAS`, `CAPTION`, `CITE`, `CODE`, `COL`, `COLGROUP`, `COMMAND`, `DATALIST`, `DD`, `DEL`, `DETAILS`, `DFN`, `DIV`, `DL`, `DT`, `EM`, `EMBED`, `FIELDSET`, `FIGCAPTION`, `FIGURE`, `FOOTER`, `FORM`, `FRAME`, `FRAMESET`, `H1`, `H2`, `H3`, `H4`, `H5`, `H6`, `HEAD`, `HEADER`, `HGROUP`, `HR`, `HTML`, `I`, `IFRAME`, `IMG`, `INPUT`, `INS`, `KBD`, `KEYGEN`, `LABEL`, `LEGEND`, `LI`, `LINK`, `MAP`, `MARK`, `META`, `METER`, `NAV`, `NOSCRIPT`, `OBJECT`, `OL`, `OPTGROUP`, `OPTION`, `OUTPUT`, `P`, `PARAM`, `PRE`, `PROGRESS`, `Q`, `RP`, `RT`, `RUBY`, `SAMP`, `SCRIPT`, `SECTION`, `SELECT`, `SMALL`, `SOURCE`, `SPAN`, `SPLIT`, `STRONG`, `STYLE`, `SUB`, `SUMMARY`, `SUP`, `TABLE`, `TBODY`, `TD`, `TEXTAREA`, `TFOOT`, `TH`, `THEAD`, `TIME`, `TITLE`, `TR`, `TRACK`, `TT`, `UL`, `VAR`, `VIDEO`, or `WBR`.\n\nThe first argument is an optional attributes object, mapping camelCased attribute names to attribute values.\n\nAll subsequent arguments are optional and appended as child nodes, merging any array arguments. Each child is appended as is if it's already a node (has a `nodeType` property), or converted to a text node otherwise. This allows you to append any DOM node generated elsewhere.\n\n### domo.CSS({selector}, [{properties}...])\n\nThis returns a CSS rule string with the specified selector and properties, for use in a stylesheet.\n\nThe first argument is a required string representing the CSS selector.\n\nAll subsequent arguments are optional objects mapping property names to property values. camelCased property names are converted to lower-case hyphenated names, and number values converted to pixels.\n\nMultiple arguments are merged into a single property list, giving you two of the benefits of using a CSS pre-processor like LESS:\n\n#### 1. Rules can be nested with child rules, so that the following are identical:\n\n```javascript\nSTYLE({type: \"text/css\"},\n  CSS(\"a\", {color: \"red\"},\n    CSS(\"img\", {borderWidth: 0})\n  )\n)\n```\n\n```javascript\nSTYLE({type: \"text/css\"},\n  CSS(\"a\", {color: \"red\"}),\n  CSS(\"a img\", {borderWidth: 0})\n)\n```\n\n#### 2. Plain functions can be used as mix-ins, to minimize common CSS repetition:\n\n```javascript\nfunction roundedCorners(radius) {\n  return {\n    borderRadius       : radius,\n    WebkitBorderRadius : radius,\n    MozBorderRadius    : radius\n  }\n}\n\nSTYLE({type: \"text/css\"},\n  CSS(\"h1\", roundedCorners(10)),\n  CSS(\"h2\", roundedCorners(5))\n)\n```\n","_npmUser":{"name":"jed","email":"tr@nslator.jp"},"repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.1.62","description":"DOM library that unifies markup and style into JavaScript syntax","directories":{}},"0.4.2":{"name":"domo","version":"0.4.2","keywords":["dom","template","browser"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.4.2","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"0dbb9f83dd92548eb4a6ca0a0ca247c1d087dedd","tarball":"https://registry.npmjs.org/domo/-/domo-0.4.2.tgz","integrity":"sha512-nLxIKRcVKHoyBmItHasblP8LjAvl9PwJ0Yq7G0oaBQaMTvGWi2CUmLc/o1D9aWNlSdqtm/TKVbi2wJob469xPg==","signatures":[{"sig":"MEYCIQDTWUepqo9OQ5ERxTQMMBysAsm15M9lmT1VNyoPpdDnCgIhAIZY9l0bk/8nynt36+XITXhEDNQaYANP1lkUIDqbsM0E","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","readme":"domo\n=====\n\ndomo is a DSL (DOM-specific language) that unifies HTML markup and CSS style into JavaScript syntax, by providing global functions for HTML5 elements and CSS declarations. To see it in action, head over to [JSBin](http://jsbin.com/egapim/46/edit). Available [here](https://raw.github.com/jed/domo/master/domo.js) or on [npm](https://npmjs.org/package/domo).\n\nFeatures\n--------\n\n- Most of what you'd want from HAML or LESS, in pure JavaScript.\n- Small, dependency-free footprint (around 1KB minizipped).\n- Straight from JS to DOM without HTML reduces XSS attack vectors.\n- Sugars well with (but completely agnostic to) CoffeeScript.\n\nNot convinced? Read a [more detailed pitch](https://gist.github.com/3916350).\n\nExample\n-------\n\n```html\n<!doctype html>\n<script>\n  HTML({lang: \"en\"},\n    HEAD(\n      TITLE(\"Hello, world\"),\n      STYLE({type: \"text/css\"},\n        CSS(\"#container\",\n          {backgroundColor: \"#eee\"},\n          roundedCorners(5)\n        )\n      )\n    ),\n\n    BODY(\n      DIV({id: \"container\"},\n        \"For more details about domo, see the source: \",\n        A({href: \"//github.com/jed/domo/blob/master/domo.js\"}, \"View source\")\n      )\n    )\n  )\n\n  function roundedCorners(radius) {\n    return {\n      borderRadius       : radius,\n      WebkitBorderRadius : radius,\n      MozBorderRadius    : radius\n    }\n  }\n</script>\n```\n\nAPI\n---\n\ndomo provides functions for CSS rules and HTML5 element types, allowing you to create DOM objects anywhere in your code without compiling templates from separate `script` tags.\n\n### domo.noConflict()\n\nBy default, domo extends the global object (`window` in the browser or `global` in node) with itself and all of its DOM/CSS functions. This allows you to access them directly, and write code that behaves like a DSL, but without any compilation step.\n\nIf polluting the global namespace isn't your style, you can call `domo.noConflict()`. This function restores all overwritten global object properties and returns the original namespace, much like its jQuery namesake.\n\n### domo.{element-name}([{attributes}], [{childNodes}...])\n\nThis returns a new DOM element of the specified name, with the optionally specified attributes, and child nodes. If the element name is `HTML`, the current document element will also be replaced with the returned element.\n\n*element* can be any of the following valid HTML5 tag names: `A`, `ABBR`, `ACRONYM`, `ADDRESS`, `AREA`, `ARTICLE`, `ASIDE`, `AUDIO`, `B`, `BDI`, `BDO`, `BIG`, `BLOCKQUOTE`, `BODY`, `BR`, `BUTTON`, `CANVAS`, `CAPTION`, `CITE`, `CODE`, `COL`, `COLGROUP`, `COMMAND`, `DATALIST`, `DD`, `DEL`, `DETAILS`, `DFN`, `DIV`, `DL`, `DT`, `EM`, `EMBED`, `FIELDSET`, `FIGCAPTION`, `FIGURE`, `FOOTER`, `FORM`, `FRAME`, `FRAMESET`, `H1`, `H2`, `H3`, `H4`, `H5`, `H6`, `HEAD`, `HEADER`, `HGROUP`, `HR`, `HTML`, `I`, `IFRAME`, `IMG`, `INPUT`, `INS`, `KBD`, `KEYGEN`, `LABEL`, `LEGEND`, `LI`, `LINK`, `MAP`, `MARK`, `META`, `METER`, `NAV`, `NOSCRIPT`, `OBJECT`, `OL`, `OPTGROUP`, `OPTION`, `OUTPUT`, `P`, `PARAM`, `PRE`, `PROGRESS`, `Q`, `RP`, `RT`, `RUBY`, `SAMP`, `SCRIPT`, `SECTION`, `SELECT`, `SMALL`, `SOURCE`, `SPAN`, `SPLIT`, `STRONG`, `STYLE`, `SUB`, `SUMMARY`, `SUP`, `TABLE`, `TBODY`, `TD`, `TEXTAREA`, `TFOOT`, `TH`, `THEAD`, `TIME`, `TITLE`, `TR`, `TRACK`, `TT`, `UL`, `VAR`, `VIDEO`, or `WBR`.\n\nThe first argument is an optional attributes object, mapping camelCased attribute names to attribute values.\n\nAll subsequent arguments are optional and appended as child nodes, merging any array arguments. Each child is appended as is if it's already a node (has a `nodeType` property), or converted to a text node otherwise. This allows you to append any DOM node generated elsewhere.\n\n### domo.CSS({selector}, [{properties}...])\n\nThis returns a CSS rule string with the specified selector and properties, for use in a stylesheet.\n\nThe first argument is a required string representing the CSS selector.\n\nAll subsequent arguments are optional objects mapping property names to property values. camelCased property names are converted to lower-case hyphenated names, and number values converted to pixels.\n\nMultiple arguments are merged into a single property list, giving you two of the benefits of using a CSS pre-processor like LESS:\n\n#### 1. Rules can be nested with child rules, so that the following are identical:\n\n```javascript\nSTYLE({type: \"text/css\"},\n  CSS(\"a\", {color: \"red\"},\n    CSS(\"img\", {borderWidth: 0})\n  )\n)\n```\n\n```javascript\nSTYLE({type: \"text/css\"},\n  CSS(\"a\", {color: \"red\"}),\n  CSS(\"a img\", {borderWidth: 0})\n)\n```\n\n#### 2. Plain functions can be used as mix-ins, to minimize common CSS repetition:\n\n```javascript\nfunction roundedCorners(radius) {\n  return {\n    borderRadius       : radius,\n    WebkitBorderRadius : radius,\n    MozBorderRadius    : radius\n  }\n}\n\nSTYLE({type: \"text/css\"},\n  CSS(\"h1\", roundedCorners(10)),\n  CSS(\"h2\", roundedCorners(5))\n)\n```\n","_npmUser":{"name":"jed","email":"tr@nslator.jp"},"repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.1.62","description":"DOM library that unifies markup and style into JavaScript syntax","directories":{}},"0.4.3":{"name":"domo","version":"0.4.3","keywords":["dom","template","browser"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.4.3","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"6fda383bea56ee6ab72435b24010dedfc27c0e58","tarball":"https://registry.npmjs.org/domo/-/domo-0.4.3.tgz","integrity":"sha512-rdN7RiECSoycgrCpaDEDbfjDsGuqMrtEmpW9wkTj5NfYdSpWnlxTFQkbfwEm78zFwiUi0Zxw1CwVyTXKftN/zw==","signatures":[{"sig":"MEYCIQCxrLWfJHhzAtVm+KYTXZTDGY42spgZTKtE4XDpVw2d/QIhAKyC6tDRiQvmqScUGeEDR1Yr7H3t14jPnhZpbkHBx5ZF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","readme":"domo\n=====\n\ndomo is a DSL (DOM-specific language) that unifies HTML markup and CSS style into JavaScript syntax, by providing global functions for HTML5 elements and CSS declarations. To see it in action, head over to [JSBin](http://jsbin.com/egapim/46/edit). Available [here](https://raw.github.com/jed/domo/master/domo.js) or on [npm](https://npmjs.org/package/domo).\n\nFeatures\n--------\n\n- Most of what you'd want from HAML or LESS, in pure JavaScript.\n- Small, dependency-free footprint (around 1KB minizipped).\n- Straight from JS to DOM without HTML reduces XSS attack vectors.\n- Sugars well with (but completely agnostic to) CoffeeScript.\n\nNot convinced? Read a [more detailed pitch](https://gist.github.com/3916350).\n\nExample\n-------\n\n```html\n<!doctype html>\n<script>\n  HTML({lang: \"en\"},\n    HEAD(\n      TITLE(\"Hello, world\"),\n      STYLE({type: \"text/css\"},\n        CSS(\"#container\",\n          {backgroundColor: \"#eee\"},\n          roundedCorners(5)\n        )\n      )\n    ),\n\n    BODY(\n      DIV({id: \"container\"},\n        \"For more details about domo, see the source: \",\n        A({href: \"//github.com/jed/domo/blob/master/domo.js\"}, \"View source\")\n      )\n    )\n  )\n\n  function roundedCorners(radius) {\n    return {\n      borderRadius       : radius,\n      WebkitBorderRadius : radius,\n      MozBorderRadius    : radius\n    }\n  }\n</script>\n```\n\nAPI\n---\n\ndomo provides functions for CSS rules and HTML5 element types, allowing you to create DOM objects anywhere in your code without compiling templates from separate `script` tags.\n\n### domo.noConflict()\n\nBy default, domo extends the global object (`window` in the browser or `global` in node) with itself and all of its DOM/CSS functions. This allows you to access them directly, and write code that behaves like a DSL, but without any compilation step.\n\nIf polluting the global namespace isn't your style, you can call `domo.noConflict()`. This function restores all overwritten global object properties and returns the original namespace, much like its jQuery namesake.\n\n### domo.{element-name}([{attributes}], [{childNodes}...])\n\nThis returns a new DOM element of the specified name, with the optionally specified attributes, and child nodes. If the element name is `HTML`, the current document element will also be replaced with the returned element.\n\n*element* can be any of the following valid HTML5 tag names: `A`, `ABBR`, `ACRONYM`, `ADDRESS`, `AREA`, `ARTICLE`, `ASIDE`, `AUDIO`, `B`, `BDI`, `BDO`, `BIG`, `BLOCKQUOTE`, `BODY`, `BR`, `BUTTON`, `CANVAS`, `CAPTION`, `CITE`, `CODE`, `COL`, `COLGROUP`, `COMMAND`, `DATALIST`, `DD`, `DEL`, `DETAILS`, `DFN`, `DIV`, `DL`, `DT`, `EM`, `EMBED`, `FIELDSET`, `FIGCAPTION`, `FIGURE`, `FOOTER`, `FORM`, `FRAME`, `FRAMESET`, `H1`, `H2`, `H3`, `H4`, `H5`, `H6`, `HEAD`, `HEADER`, `HGROUP`, `HR`, `HTML`, `I`, `IFRAME`, `IMG`, `INPUT`, `INS`, `KBD`, `KEYGEN`, `LABEL`, `LEGEND`, `LI`, `LINK`, `MAP`, `MARK`, `META`, `METER`, `NAV`, `NOSCRIPT`, `OBJECT`, `OL`, `OPTGROUP`, `OPTION`, `OUTPUT`, `P`, `PARAM`, `PRE`, `PROGRESS`, `Q`, `RP`, `RT`, `RUBY`, `SAMP`, `SCRIPT`, `SECTION`, `SELECT`, `SMALL`, `SOURCE`, `SPAN`, `SPLIT`, `STRONG`, `STYLE`, `SUB`, `SUMMARY`, `SUP`, `TABLE`, `TBODY`, `TD`, `TEXTAREA`, `TFOOT`, `TH`, `THEAD`, `TIME`, `TITLE`, `TR`, `TRACK`, `TT`, `UL`, `VAR`, `VIDEO`, or `WBR`.\n\nThe first argument is an optional attributes object, mapping camelCased attribute names to attribute values.\n\nAll subsequent arguments are optional and appended as child nodes, merging any array arguments. Each child is appended as is if it's already a node (has a `nodeType` property), or converted to a text node otherwise. This allows you to append any DOM node generated elsewhere.\n\n### domo.CSS({selector}, [{properties}...])\n\nThis returns a CSS rule string with the specified selector and properties, for use in a stylesheet.\n\nThe first argument is a required string representing the CSS selector.\n\nAll subsequent arguments are optional objects mapping property names to property values. camelCased property names are converted to lower-case hyphenated names, and number values converted to pixels.\n\nMultiple arguments are merged into a single property list, giving you two of the benefits of using a CSS pre-processor like LESS:\n\n#### 1. Rules can be nested with child rules, so that the following are identical:\n\n```javascript\nSTYLE({type: \"text/css\"},\n  CSS(\"a\", {color: \"red\"},\n    CSS(\"img\", {borderWidth: 0})\n  )\n)\n```\n\n```javascript\nSTYLE({type: \"text/css\"},\n  CSS(\"a\", {color: \"red\"}),\n  CSS(\"a img\", {borderWidth: 0})\n)\n```\n\n#### 2. Plain functions can be used as mix-ins, to minimize common CSS repetition:\n\n```javascript\nfunction roundedCorners(radius) {\n  return {\n    borderRadius       : radius,\n    WebkitBorderRadius : radius,\n    MozBorderRadius    : radius\n  }\n}\n\nSTYLE({type: \"text/css\"},\n  CSS(\"h1\", roundedCorners(10)),\n  CSS(\"h2\", roundedCorners(5))\n)\n```\n","_npmUser":{"name":"jed","email":"tr@nslator.jp"},"repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.1.62","description":"DOM library that unifies markup and style into JavaScript syntax","directories":{}},"0.4.4":{"name":"domo","version":"0.4.4","keywords":["dom","template","browser"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.4.4","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"e71d9e0a13d42d99ed6f79275a74ae70a0241ad0","tarball":"https://registry.npmjs.org/domo/-/domo-0.4.4.tgz","integrity":"sha512-+rUlwXv+dnR+cjZzmzRXObwU6D3ZvAApioTlVuS9EaVafgVqeyQFOxZ4rWyalSMzhoSFo+ZqSsZpy3LTE5NDcw==","signatures":[{"sig":"MEYCIQDXEQyfaH1PRItPHKqzC4pJ4iLHcDB+SzRmZT9L+Oa1IAIhALteyxhiACxUB1TscFvJe0zpsQ0L180/anll0+12AaQ2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","readme":"domo\n=====\n\ndomo is a DSL (DOM-specific language) that unifies HTML markup and CSS style into JavaScript syntax, by providing global functions for HTML5 elements and CSS declarations. To see it in action, head over to [JSBin](http://jsbin.com/egapim/46/edit). Available [here](https://raw.github.com/jed/domo/master/domo.js) or on [npm](https://npmjs.org/package/domo).\n\nFeatures\n--------\n\n- Most of what you'd want from HAML or LESS, in pure JavaScript.\n- Small, dependency-free footprint (around 1KB minizipped).\n- Straight from JS to DOM without HTML reduces XSS attack vectors.\n- Sugars well with (but completely agnostic to) CoffeeScript.\n\nNot convinced? Read a [more detailed pitch](https://gist.github.com/3916350).\n\nExample\n-------\n\n```html\n<!doctype html>\n<script>\n  HTML({lang: \"en\"},\n    HEAD(\n      TITLE(\"Hello, world\"),\n      STYLE({type: \"text/css\"},\n        CSS(\"#container\",\n          {backgroundColor: \"#eee\"},\n          roundedCorners(5)\n        )\n      )\n    ),\n\n    BODY(\n      DIV({id: \"container\"},\n        \"For more details about domo, see the source: \",\n        A({href: \"//github.com/jed/domo/blob/master/domo.js\"}, \"View source\")\n      )\n    )\n  )\n\n  function roundedCorners(radius) {\n    return {\n      borderRadius       : radius,\n      WebkitBorderRadius : radius,\n      MozBorderRadius    : radius\n    }\n  }\n</script>\n```\n\nAPI\n---\n\ndomo provides functions for CSS rules and HTML5 element types, allowing you to create DOM objects anywhere in your code without compiling templates from separate `script` tags.\n\n### domo.noConflict()\n\nBy default, domo extends the global object (`window` in the browser or `global` in node) with itself and all of its DOM/CSS functions. This allows you to access them directly, and write code that behaves like a DSL, but without any compilation step.\n\nIf polluting the global namespace isn't your style, you can call `domo.noConflict()`. This function restores all overwritten global object properties and returns the original namespace, much like its jQuery namesake.\n\n### domo.{element-name}([{attributes}], [{childNodes}...])\n\nThis returns a new DOM element of the specified name, with the optionally specified attributes, and child nodes. If the element name is `HTML`, the current document element will also be replaced with the returned element.\n\n*element* can be any of the following valid HTML5 tag names: `A`, `ABBR`, `ACRONYM`, `ADDRESS`, `AREA`, `ARTICLE`, `ASIDE`, `AUDIO`, `B`, `BDI`, `BDO`, `BIG`, `BLOCKQUOTE`, `BODY`, `BR`, `BUTTON`, `CANVAS`, `CAPTION`, `CITE`, `CODE`, `COL`, `COLGROUP`, `COMMAND`, `DATALIST`, `DD`, `DEL`, `DETAILS`, `DFN`, `DIV`, `DL`, `DT`, `EM`, `EMBED`, `FIELDSET`, `FIGCAPTION`, `FIGURE`, `FOOTER`, `FORM`, `FRAME`, `FRAMESET`, `H1`, `H2`, `H3`, `H4`, `H5`, `H6`, `HEAD`, `HEADER`, `HGROUP`, `HR`, `HTML`, `I`, `IFRAME`, `IMG`, `INPUT`, `INS`, `KBD`, `KEYGEN`, `LABEL`, `LEGEND`, `LI`, `LINK`, `MAP`, `MARK`, `META`, `METER`, `NAV`, `NOSCRIPT`, `OBJECT`, `OL`, `OPTGROUP`, `OPTION`, `OUTPUT`, `P`, `PARAM`, `PRE`, `PROGRESS`, `Q`, `RP`, `RT`, `RUBY`, `SAMP`, `SCRIPT`, `SECTION`, `SELECT`, `SMALL`, `SOURCE`, `SPAN`, `SPLIT`, `STRONG`, `STYLE`, `SUB`, `SUMMARY`, `SUP`, `TABLE`, `TBODY`, `TD`, `TEXTAREA`, `TFOOT`, `TH`, `THEAD`, `TIME`, `TITLE`, `TR`, `TRACK`, `TT`, `UL`, `VAR`, `VIDEO`, or `WBR`.\n\nThe first argument is an optional attributes object, mapping camelCased attribute names to attribute values.\n\nAll subsequent arguments are optional and appended as child nodes, merging any array arguments. Each child is appended as is if it's already a node (has a `nodeType` property), or converted to a text node otherwise. This allows you to append any DOM node generated elsewhere.\n\n### domo.CSS({selector}, [{properties}...])\n\nThis returns a CSS rule string with the specified selector and properties, for use in a stylesheet.\n\nThe first argument is a required string representing the CSS selector.\n\nAll subsequent arguments are optional objects mapping property names to property values. camelCased property names are converted to lower-case hyphenated names, and number values converted to pixels.\n\nMultiple arguments are merged into a single property list, giving you two of the benefits of using a CSS pre-processor like LESS:\n\n#### 1. Rules can be nested with child rules, so that the following are identical:\n\n```javascript\nSTYLE({type: \"text/css\"},\n  CSS(\"a\", {color: \"red\"},\n    CSS(\"img\", {borderWidth: 0})\n  )\n)\n```\n\n```javascript\nSTYLE({type: \"text/css\"},\n  CSS(\"a\", {color: \"red\"}),\n  CSS(\"a img\", {borderWidth: 0})\n)\n```\n\n#### 2. Plain functions can be used as mix-ins, to minimize common CSS repetition:\n\n```javascript\nfunction roundedCorners(radius) {\n  return {\n    borderRadius       : radius,\n    WebkitBorderRadius : radius,\n    MozBorderRadius    : radius\n  }\n}\n\nSTYLE({type: \"text/css\"},\n  CSS(\"h1\", roundedCorners(10)),\n  CSS(\"h2\", roundedCorners(5))\n)\n```\n","_npmUser":{"name":"jed","email":"tr@nslator.jp"},"repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.1.62","description":"DOM library that unifies markup and style into JavaScript syntax","directories":{}},"0.5.0":{"name":"domo","version":"0.5.0","keywords":["dom","html","css","template","browser","server"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.5.0","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"39fe2fb7814184168bedd4da34e559ecd774352f","tarball":"https://registry.npmjs.org/domo/-/domo-0.5.0.tgz","integrity":"sha512-YxhNzxoETJY41tmYL67mAMw89SePhjHs5/ICa3Ts4R9gbLgyZo75/U4VE38QCt7OzZLHOcijSbKObRupvo/+tA==","signatures":[{"sig":"MEQCIHSOqmHxyRgrCDtFh1JQXor4YfzVFW6FFhdP4DkJXKwmAiAAz0uJNFmmzy3rWWqqEORhZ9zEmSxuqdEUCSEBxbS2FA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","readme":"domo\n====\n\ndomo is a JavaScript library that pulls HTML markup and CSS style into JavaScript syntax, in the [browser][browser] and on the [server][server]. It's a simpler, easier, and more reliable alternative to template engines and CSS pre-processors. You can find it on [github][domo_github] and [npm][npm].\n\n[browser]: #browser\n[server]: #server\n[domo_github]: https://raw.github.com/jed/domo/master/domo.js\n[npm]: https://npmjs.org/package/domo\n\nExample\n-------\n\nThe following is a simple, self-contained example using domo in the browser. It generates a DOM tree and replaces the existing documentElement, using a plain old function as a CSS mixin.\n\n```html\n<!doctype html>\n<script src=\"domo.js\"></script>\n<script>\n  HTML({lang: \"en\"},\n    HEAD(\n      TITLE(\"Hello, world\"),\n      STYLE({type: \"text/css\"},\n        CSS(\"#container\",\n          {backgroundColor: \"#eee\"},\n          roundedCorners(5)\n        )\n      )\n    ),\n\n    BODY(\n      DIV({id: \"container\"},\n        \"For more details about domo, see the source: \",\n        BR,\n        BR,\n        A({href: \"//github.com/jed/domo/blob/master/domo.js\"}, \"View source\")\n      )\n    )\n  )\n\n  function roundedCorners(radius) {\n    return {\n      borderRadius       : radius,\n      WebkitBorderRadius : radius,\n      MozBorderRadius    : radius\n    }\n  }\n</script>\n```\n\nWhy domo?\n---------\n\n- **Reduce your exposure to XSS attacks.** Writing straight from JavaScript to DOM without an HTML step means you don't need to rely on a library to sanitize your rendered data because the browser does it for you automatically.\n\n- **Eliminate a separate compile step.** With DOM builders, \"compilation\" is done in the same JavaScript process as your code, which means that any syntax errors are thrown with line numbers in the same JavaScript process.\n\n- **Don't let implentations drive architectural decisions.** If you're writing a view that renders a DOM node, you can write it directly within the rendering code for convenience, and then pull it out into its own file when the size of your app requires it.\n\n- **Use JavaScript syntax everywhere.** Instead of remembering which [HAML][haml] or [LESS][less] symbols map to which behaviors like looping or escaping or conditionals or negation, just use JavaScript.\n\n[haml]: http://haml.info\n[less]: http://lesscss.org\n\n- **Decouple your syntax sugar.** Instead of choosing a template engine or CSS compiler with the ideal syntax, just use JavaScript, and do your sweetening on a more reliable level. [CoffeeScript][coffeescript] can go a long way in [making DOM building code look like HAML][browserver], for example.\n\n[browserver]: https://github.com/jed/browserver.org/blob/master/app.coffee\n[coffeescript]: #coffeescript\n\n- **Reduce the number of moving parts.** Instead of shipping HTML containing strings that compile into JavaScript functions that return HTML used to create DOM nodes, just use JavaScript to create DOM nodes, potentially eliminating [underscore][underscore]/[jQuery][jQuery] dependencies at the same time.\n\n[underscore]: http://underscorejs.org/#template\n[jQuery]: http://api.jquery.com/html\n\n- **Reuse existing infrastructure.** Any tools you use in your JavaScript workflow, such as minification or packaging, can now be used for your styles and markup too. You can even use something like [browserify][browserify] to easily discover all app dependencies and maintain code modularity.\n\n[browserify]: https://github.com/substack/node-browserify\n\n- **Lessen the burden of context switching.** Whether using JavaScript on both the client and server enables code reuse is debatable, but that it prevents the overhead of switching contexts between languages is less so. It may be subjective, but I think using one language everywhere reduces the congitive overhead for web app development.\n\nAPI\n---\n\ndomo provides functions for CSS rules and HTML5 element types, allowing you to create DOM objects anywhere in your code without compiling templates from separate `script` tags.\n\n### domo.noConflict()\n\nBy default, domo extends the global object (`window` in the browser or `global` in node) with itself and all of its DOM/CSS functions. This allows you to access them directly, and write code that behaves like a DSL, but without any compilation step.\n\nIf polluting the global namespace isn't your style, you can call `domo.noConflict()`. This function restores all overwritten global object properties and returns the original namespace, much like its jQuery namesake.\n\n### domo.{element-name}([{attributes}], [{childNodes}...])\n\nThis returns a new DOM element of the specified name, with the optionally specified attributes, and child nodes. If the element name is `HTML`, the current document element will also be replaced with the returned element.\n\n*element* can be any of the following valid HTML5 tag names: `A`, `ABBR`, `ACRONYM`, `ADDRESS`, `AREA`, `ARTICLE`, `ASIDE`, `AUDIO`, `B`, `BDI`, `BDO`, `BIG`, `BLOCKQUOTE`, `BODY`, `BR`, `BUTTON`, `CANVAS`, `CAPTION`, `CITE`, `CODE`, `COL`, `COLGROUP`, `COMMAND`, `DATALIST`, `DD`, `DEL`, `DETAILS`, `DFN`, `DIV`, `DL`, `DT`, `EM`, `EMBED`, `FIELDSET`, `FIGCAPTION`, `FIGURE`, `FOOTER`, `FORM`, `FRAME`, `FRAMESET`, `H1`, `H2`, `H3`, `H4`, `H5`, `H6`, `HEAD`, `HEADER`, `HGROUP`, `HR`, `HTML`, `I`, `IFRAME`, `IMG`, `INPUT`, `INS`, `KBD`, `KEYGEN`, `LABEL`, `LEGEND`, `LI`, `LINK`, `MAP`, `MARK`, `META`, `METER`, `NAV`, `NOSCRIPT`, `OBJECT`, `OL`, `OPTGROUP`, `OPTION`, `OUTPUT`, `P`, `PARAM`, `PRE`, `PROGRESS`, `Q`, `RP`, `RT`, `RUBY`, `SAMP`, `SCRIPT`, `SECTION`, `SELECT`, `SMALL`, `SOURCE`, `SPAN`, `SPLIT`, `STRONG`, `STYLE`, `SUB`, `SUMMARY`, `SUP`, `TABLE`, `TBODY`, `TD`, `TEXTAREA`, `TFOOT`, `TH`, `THEAD`, `TIME`, `TITLE`, `TR`, `TRACK`, `TT`, `UL`, `VAR`, `VIDEO`, or `WBR`.\n\nThe first argument is an optional attributes object, mapping camelCased attribute names to attribute values.\n\nAll subsequent arguments are optional and appended as child nodes, merging any array arguments. Each child is appended as is if it's already a node (has a `nodeType` property), or converted to a text node otherwise. This allows you to append any DOM node generated elsewhere.\n\n### domo.CSS({selector}, [{properties}...])\n\nThis returns a CSS rule string with the specified selector and properties, for use in a stylesheet.\n\nThe first argument is a required string representing the CSS selector.\n\nAll subsequent arguments are optional objects mapping property names to property values. camelCased property names are converted to lower-case hyphenated names, and number values converted to pixels.\n\nMultiple arguments are merged into a single property list, giving you two of the benefits of using a CSS pre-processor like LESS:\n\n#### 1. Rules can be nested with child rules, so that the following are identical:\n\n```javascript\nSTYLE({type: \"text/css\"},\n  CSS(\"a\", {color: \"red\"},\n    CSS(\"img\", {borderWidth: 0})\n  )\n)\n```\n\n```javascript\nSTYLE({type: \"text/css\"},\n  CSS(\"a\", {color: \"red\"}),\n  CSS(\"a img\", {borderWidth: 0})\n)\n```\n\n#### 2. Plain functions can be used as mix-ins, to minimize common CSS repetition:\n\n```javascript\nfunction roundedCorners(radius) {\n  return {\n    borderRadius       : radius,\n    WebkitBorderRadius : radius,\n    MozBorderRadius    : radius\n  }\n}\n\nSTYLE({type: \"text/css\"},\n  CSS(\"h1\", roundedCorners(10)),\n  CSS(\"h2\", roundedCorners(5))\n)\n```\n\nUsing domo for HTML\n-------------------\n\nComing soon.\n\nUsing domo for CSS\n------------------\n\nComing soon.\n\nUsing domo on the server\n------------------------\n\ndomo really shines when used to build DOM code on the client. But since you'll likely need to render an HTML client in the first place, domo also ships with a [window.document shim](https://github.com/jed/domo/blob/master/document.js) that can be used to render HTML on the server. It's a small (under 1KB minizipped) mock DOM implementation with just enough logic to render HTML.\n\nOnce you've run `npm install domo`, the API for the server is the same as that for the client. Just `require(\"domo\")`, create a DOM, and then use the `outerHTML` property to serialize it into HTML. domo also adds a top-level `DOCUMENT` function for creating an entire HTML document with doctype, like this:\n\n```javascript\nrequire(\"domo\")\n\nvar document =\n\nDOCUMENT({type: \"html\"}\n  HTML(\n    HEAD(\n      SCRIPT({src: \"/app.js\"})\n    ),\n    BODY(\"Loading...\")\n  )\n)\n\nconsole.log(document.outerHTML)\n```\n\nwhich would render into this:\n\n```html\n<!DOCTYPE html>\n<html><head><script src=\"/app.js\"></script></head><body>Loading...</body></html>\n```\n\nSome things to note about using domo on the server:\n\n- The attributes passed to `DOCUMENT` are optional, with the `type` attribute defaulting to `html`.\n- All text node strings and attribute values are HTML-escaped.\n- The `outerHTML` is available on the document and every element, and is a lazy ES5 getter that calls `toString()` for performance.\n\nUsing domo with CoffeeScript\n----------------------------\n\nComing soon.\n","scripts":{"build":"node build.js"},"_npmUser":{"name":"jed","email":"tr@nslator.jp"},"repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.1.65","description":"Markup, style, and code in one language.","directories":{},"readmeFilename":"README.md","devDependencies":{"uglify-js":"~1.3.4","coffee-script":"~1.4.0"}},"0.5.1":{"name":"domo","version":"0.5.1","keywords":["dom","html","css","template","browser","server"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.5.1","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"63ca5d26962f50c1b54957cca446fa53c107be21","tarball":"https://registry.npmjs.org/domo/-/domo-0.5.1.tgz","integrity":"sha512-OsOjFQGY+0PylL4jiMmGvrcQci/Pwhdn+4e9az8bcrnfL4Kek1kMVaxaakIQNrPKfq5SALDjXG1Jdd4QBvB6OQ==","signatures":[{"sig":"MEUCICtGsyyxdjguOBkIZkVfVbLN5qmV6EDGxYZrGAm9nXrwAiEAuAWDI6lQ12SqA1pRTdpqq8T9WtlIxhiyt4Npatv+pis=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","readme":"domo\n====\n\ndomo is a JavaScript library that pulls HTML markup and CSS style into JavaScript syntax, in the browser and on the server. It's a simpler, easier, and more reliable alternative to template engines and CSS pre-processors. You can find it on [github][domo_github] and [npm][npm].\n\n[domo_github]: https://raw.github.com/jed/domo/master/domo.js\n[npm]: https://npmjs.org/package/domo\n\nExample\n-------\n\nThe following is a simple, self-contained example using domo in the browser. It generates a DOM tree and replaces the existing documentElement, using a plain old function as a CSS mixin.\n\n```html\n<!doctype html>\n<script src=\"domo.js\"></script>\n<script>\n  HTML({lang: \"en\"},\n    HEAD(\n      TITLE(\"Hello, world\"),\n      STYLE({type: \"text/css\"},\n        RULE(\"#container\",\n          {backgroundColor: \"#eee\"},\n          roundedCorners(5)\n        )\n      )\n    ),\n\n    BODY(\n      DIV({id: \"container\"},\n        \"For more details about domo, see the source: \",\n        BR,\n        BR,\n        A({href: \"//github.com/jed/domo/blob/master/domo.js\"}, \"View source\")\n      )\n    )\n  )\n\n  function roundedCorners(radius) {\n    return {\n      borderRadius       : radius,\n      WebkitBorderRadius : radius,\n      MozBorderRadius    : radius\n    }\n  }\n</script>\n```\n\nWhy domo?\n---------\n\n- **Reduce your exposure to XSS attacks.** Writing straight from JavaScript to DOM without an HTML step means you don't need to rely on a library to sanitize your rendered data because the browser does it for you automatically.\n\n- **Eliminate a separate compile step.** With DOM builders, \"compilation\" is done in the same JavaScript process as your code, which means that any syntax errors are thrown with line numbers in the same JavaScript process.\n\n- **Don't let implentations drive architectural decisions.** If you're writing a view that renders a DOM node, you can write it directly within the rendering code for convenience, and then pull it out into its own file when the size of your app requires it.\n\n- **Use JavaScript syntax everywhere.** Instead of remembering which [HAML][haml] or [LESS][less] symbols map to which behaviors like looping or escaping or conditionals or negation, just use JavaScript.\n\n[haml]: http://haml.info\n[less]: http://lesscss.org\n\n- **Decouple your syntax sugar.** Instead of choosing a template engine or CSS compiler with the ideal syntax, just use JavaScript, and do your sweetening on a more reliable level. [CoffeeScript][coffeescript] can go a long way in [making DOM building code look like HAML][browserver], for example.\n\n[browserver]: https://github.com/jed/browserver.org/blob/master/app.coffee\n[coffeescript]: #coffeescript\n\n- **Reduce the number of moving parts.** Instead of shipping HTML containing strings that compile into JavaScript functions that return HTML used to create DOM nodes, just use JavaScript to create DOM nodes, potentially eliminating [underscore][underscore]/[jQuery][jQuery] dependencies at the same time.\n\n[underscore]: http://underscorejs.org/#template\n[jQuery]: http://api.jquery.com/html\n\n- **Reuse existing infrastructure.** Any tools you use in your JavaScript workflow, such as minification or packaging, can now be used for your styles and markup too. You can even use something like [browserify][browserify] to easily discover all app dependencies and maintain code modularity.\n\n[browserify]: https://github.com/substack/node-browserify\n\n- **Lessen the burden of context switching.** Whether using JavaScript on both the client and server enables code reuse is debatable, but that it prevents the overhead of switching contexts between languages is less so. It may be subjective, but I think using one language everywhere reduces the congitive overhead for web app development.\n\nAPI\n---\n\ndomo provides functions for CSS rules and HTML5 element types, allowing you to create DOM objects anywhere in your code without compiling templates from separate `script` tags.\n\n### domo.global(isGlobal)\n\nBy default, domo extends the global object (`window` in the browser or `global` in node) with itself and all of its DOM/CSS functions. This allows you to access them directly, and write code that behaves like a DSL, but without any compilation step.\n\nIf polluting the global namespace isn't your style, you can call `domo.global(false)`. This function restores all overwritten global object properties and returns the original namespace, much like the jQuery `.noConflict()` method.\n\n### domo.{element-name}([{attributes}], [{childNodes}...])\n\nThis returns a new DOM element of the specified name, with the optionally specified attributes, and child nodes. If the element name is `HTML`, the current document element will also be replaced with the returned element.\n\n*element* can be any of the following valid HTML5 tag names: `A`, `ABBR`, `ACRONYM`, `ADDRESS`, `AREA`, `ARTICLE`, `ASIDE`, `AUDIO`, `B`, `BDI`, `BDO`, `BIG`, `BLOCKQUOTE`, `BODY`, `BR`, `BUTTON`, `CANVAS`, `CAPTION`, `CITE`, `CODE`, `COL`, `COLGROUP`, `COMMAND`, `DATALIST`, `DD`, `DEL`, `DETAILS`, `DFN`, `DIV`, `DL`, `DT`, `EM`, `EMBED`, `FIELDSET`, `FIGCAPTION`, `FIGURE`, `FOOTER`, `FORM`, `FRAME`, `FRAMESET`, `H1`, `H2`, `H3`, `H4`, `H5`, `H6`, `HEAD`, `HEADER`, `HGROUP`, `HR`, `HTML`, `I`, `IFRAME`, `IMG`, `INPUT`, `INS`, `KBD`, `KEYGEN`, `LABEL`, `LEGEND`, `LI`, `LINK`, `MAP`, `MARK`, `META`, `METER`, `NAV`, `NOSCRIPT`, `OBJECT`, `OL`, `OPTGROUP`, `OPTION`, `OUTPUT`, `P`, `PARAM`, `PRE`, `PROGRESS`, `Q`, `RP`, `RT`, `RUBY`, `SAMP`, `SCRIPT`, `SECTION`, `SELECT`, `SMALL`, `SOURCE`, `SPAN`, `SPLIT`, `STRONG`, `STYLE`, `SUB`, `SUMMARY`, `SUP`, `TABLE`, `TBODY`, `TD`, `TEXTAREA`, `TFOOT`, `TH`, `THEAD`, `TIME`, `TITLE`, `TR`, `TRACK`, `TT`, `UL`, `VAR`, `VIDEO`, or `WBR`.\n\nThe first argument is an optional attributes object, mapping camelCased attribute names to attribute values.\n\nAll subsequent arguments are optional and appended as child nodes, merging any array arguments. Each child is appended as is if it's already a node (has a `nodeType` property), or converted to a text node otherwise. This allows you to append any DOM node generated elsewhere.\n\n### domo.RULE({selector}, [{properties}...])\n\nThis returns a CSS rule string with the specified selector and properties, for use in a stylesheet.\n\nThe first argument is a required string representing the CSS selector.\n\nAll subsequent arguments are optional objects mapping property names to property values. camelCased property names are converted to lower-case hyphenated names, and number values converted to pixels.\n\nMultiple arguments are merged into a single property list, giving you two of the benefits of using a CSS pre-processor like LESS:\n\n#### 1. Rules can be nested with child rules, so that the following are identical:\n\n```javascript\nSTYLE({type: \"text/css\"},\n  RULE(\"a\", {color: \"red\"},\n    RULE(\"img\", {borderWidth: 0})\n  )\n)\n```\n\n```javascript\nSTYLE({type: \"text/css\"},\n  RULE(\"a\", {color: \"red\"}),\n  RULE(\"a img\", {borderWidth: 0})\n)\n```\n\n#### 2. Plain functions can be used as mix-ins, to minimize common CSS repetition:\n\n```javascript\nfunction roundedCorners(radius) {\n  return {\n    borderRadius       : radius,\n    WebkitBorderRadius : radius,\n    MozBorderRadius    : radius\n  }\n}\n\nSTYLE({type: \"text/css\"},\n  RULE(\"h1\", roundedCorners(10)),\n  RULE(\"h2\", roundedCorners(5))\n)\n```\n\nUsing domo on the server\n------------------------\n\ndomo really shines when used to build DOM code on the client. But since you'll likely need to render an HTML client in the first place, domo also ships with a [window.document shim](https://github.com/jed/domo/blob/master/document.js) that can be used to render HTML on the server. It's a small (under 1KB minizipped) mock DOM implementation with just enough logic to render HTML.\n\nOnce you've run `npm install domo`, the API for the server is the same as that for the client. Just `require(\"domo\")`, create a DOM, and then use the `outerHTML` property to serialize it into HTML. domo also adds a top-level `DOCUMENT` function for creating an entire HTML document with doctype, like this:\n\n```javascript\nrequire(\"domo\")\n\nvar document =\n\nDOCUMENT({type: \"html\"}\n  HTML(\n    HEAD(\n      SCRIPT({src: \"/app.js\"})\n    ),\n    BODY(\"Loading...\")\n  )\n)\n\nconsole.log(document.outerHTML)\n```\n\nwhich would render into this:\n\n```html\n<!DOCTYPE html>\n<html><head><script src=\"/app.js\"></script></head><body>Loading...</body></html>\n```\n\nSome things to note about using domo on the server:\n\n- The attributes passed to `DOCUMENT` are optional, with the `type` attribute defaulting to `html`.\n- All text node strings and attribute values are HTML-escaped.\n- The `outerHTML` is available on the document and every element, and is a lazy ES5 getter that calls `toString()` for performance.\n","scripts":{"build":"node build.js"},"_npmUser":{"name":"jed","email":"tr@nslator.jp"},"repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.1.65","description":"Markup, style, and code in one language.","directories":{},"readmeFilename":"README.md","devDependencies":{"uglify-js":"~1.3.4","coffee-script":"~1.4.0"}},"0.5.2":{"name":"domo","version":"0.5.2","keywords":["dom","html","css","template","browser","server"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.5.2","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"70fa331c033aa003f921633973c813ee3d1bc26f","tarball":"https://registry.npmjs.org/domo/-/domo-0.5.2.tgz","integrity":"sha512-NSMnd0tjdgb1IpRzv7KItWzkhPPEsnIVNqkJVEqyumOnCQ317dS+s/D6vYKUFzEeGxacvzDG0nOsa40kgyuDWA==","signatures":[{"sig":"MEUCIH9EtA20m4e8G/tEqLKV4w4n6FqbJuNsAzBRhkbdfVVmAiEAjrVDOgpJb0zDIJKLqTahsvT2/NKfHLxvWC+8fxoSw0I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","readme":"domo\n====\n\ndomo is a JavaScript library that pulls HTML markup and CSS style into JavaScript syntax, in the browser and on the server. It's a simpler, easier, and more reliable alternative to template engines and CSS pre-processors. You can find it on [github][domo_github] and [npm][npm].\n\n[domo_github]: https://raw.github.com/jed/domo/master/domo.js\n[npm]: https://npmjs.org/package/domo\n\nExample\n-------\n\nThe following is a simple, self-contained example using domo in the browser. It generates a DOM tree and replaces the existing documentElement, using a plain old function as a CSS mixin.\n\n```html\n<!doctype html>\n<script src=\"domo.js\"></script>\n<script>\n  HTML({lang: \"en\"},\n    HEAD(\n      TITLE(\"Hello, world\"),\n      STYLE({type: \"text/css\"},\n        RULE(\"#container\",\n          {backgroundColor: \"#eee\"},\n          roundedCorners(5)\n        )\n      )\n    ),\n\n    BODY(\n      DIV({id: \"container\"},\n        \"For more details about domo, see the source: \",\n        BR,\n        BR,\n        A({href: \"//github.com/jed/domo/blob/master/domo.js\"}, \"View source\")\n      )\n    )\n  )\n\n  function roundedCorners(radius) {\n    return {\n      borderRadius       : radius,\n      WebkitBorderRadius : radius,\n      MozBorderRadius    : radius\n    }\n  }\n</script>\n```\n\nWhy domo?\n---------\n\n- **Reduce your exposure to XSS attacks.** Writing straight from JavaScript to DOM without an HTML step means you don't need to rely on a library to sanitize your rendered data because the browser does it for you automatically.\n\n- **Eliminate a separate compile step.** With DOM builders, \"compilation\" is done in the same JavaScript process as your code, which means that any syntax errors are thrown with line numbers in the same JavaScript process.\n\n- **Don't let implentations drive architectural decisions.** If you're writing a view that renders a DOM node, you can write it directly within the rendering code for convenience, and then pull it out into its own file when the size of your app requires it.\n\n- **Use JavaScript syntax everywhere.** Instead of remembering which [HAML][haml] or [LESS][less] symbols map to which behaviors like looping or escaping or conditionals or negation, just use JavaScript.\n\n[haml]: http://haml.info\n[less]: http://lesscss.org\n\n- **Decouple your syntax sugar.** Instead of choosing a template engine or CSS compiler with the ideal syntax, just use JavaScript, and do your sweetening on a more reliable level. [CoffeeScript][coffeescript] can go a long way in [making DOM building code look like HAML][browserver], for example.\n\n[browserver]: https://github.com/jed/browserver.org/blob/master/app.coffee\n[coffeescript]: #coffeescript\n\n- **Reduce the number of moving parts.** Instead of shipping HTML containing strings that compile into JavaScript functions that return HTML used to create DOM nodes, just use JavaScript to create DOM nodes, potentially eliminating [underscore][underscore]/[jQuery][jQuery] dependencies at the same time.\n\n[underscore]: http://underscorejs.org/#template\n[jQuery]: http://api.jquery.com/html\n\n- **Reuse existing infrastructure.** Any tools you use in your JavaScript workflow, such as minification or packaging, can now be used for your styles and markup too. You can even use something like [browserify][browserify] to easily discover all app dependencies and maintain code modularity.\n\n[browserify]: https://github.com/substack/node-browserify\n\n- **Lessen the burden of context switching.** Whether using JavaScript on both the client and server enables code reuse is debatable, but that it prevents the overhead of switching contexts between languages is less so. It may be subjective, but I think using one language everywhere reduces the congitive overhead for web app development.\n\nAPI\n---\n\ndomo provides functions for CSS rules and HTML5 element types, allowing you to create DOM objects anywhere in your code without compiling templates from separate `script` tags.\n\n### domo.global(isGlobal)\n\nBy default, domo extends the global object (`window` in the browser or `global` in node) with itself and all of its DOM/CSS functions. This allows you to access them directly, and write code that behaves like a DSL, but without any compilation step.\n\nIf polluting the global namespace isn't your style, you can call `domo.global(false)`. This function restores all overwritten global object properties and returns the original namespace, much like the jQuery `.noConflict()` method.\n\n### domo.{element-name}([{attributes}], [{childNodes}...])\n\nThis returns a new DOM element of the specified name, with the optionally specified attributes, and child nodes. If the element name is `HTML`, the current document element will also be replaced with the returned element.\n\n*element* can be any of the following valid HTML5 tag names: `A`, `ABBR`, `ACRONYM`, `ADDRESS`, `AREA`, `ARTICLE`, `ASIDE`, `AUDIO`, `B`, `BDI`, `BDO`, `BIG`, `BLOCKQUOTE`, `BODY`, `BR`, `BUTTON`, `CANVAS`, `CAPTION`, `CITE`, `CODE`, `COL`, `COLGROUP`, `COMMAND`, `DATALIST`, `DD`, `DEL`, `DETAILS`, `DFN`, `DIV`, `DL`, `DT`, `EM`, `EMBED`, `FIELDSET`, `FIGCAPTION`, `FIGURE`, `FOOTER`, `FORM`, `FRAME`, `FRAMESET`, `H1`, `H2`, `H3`, `H4`, `H5`, `H6`, `HEAD`, `HEADER`, `HGROUP`, `HR`, `HTML`, `I`, `IFRAME`, `IMG`, `INPUT`, `INS`, `KBD`, `KEYGEN`, `LABEL`, `LEGEND`, `LI`, `LINK`, `MAP`, `MARK`, `META`, `METER`, `NAV`, `NOSCRIPT`, `OBJECT`, `OL`, `OPTGROUP`, `OPTION`, `OUTPUT`, `P`, `PARAM`, `PRE`, `PROGRESS`, `Q`, `RP`, `RT`, `RUBY`, `SAMP`, `SCRIPT`, `SECTION`, `SELECT`, `SMALL`, `SOURCE`, `SPAN`, `SPLIT`, `STRONG`, `STYLE`, `SUB`, `SUMMARY`, `SUP`, `TABLE`, `TBODY`, `TD`, `TEXTAREA`, `TFOOT`, `TH`, `THEAD`, `TIME`, `TITLE`, `TR`, `TRACK`, `TT`, `UL`, `VAR`, `VIDEO`, or `WBR`.\n\nThe first argument is an optional attributes object, mapping camelCased attribute names to attribute values.\n\nAll subsequent arguments are optional and appended as child nodes, merging any array arguments. Each child is appended as is if it's already a node (has a `nodeType` property), or converted to a text node otherwise. This allows you to append any DOM node generated elsewhere.\n\n### domo.RULE({selector}, [{properties}...])\n\nThis returns a CSS rule string with the specified selector and properties, for use in a stylesheet.\n\nThe first argument is a required string representing the CSS selector.\n\nAll subsequent arguments are optional objects mapping property names to property values. camelCased property names are converted to lower-case hyphenated names, and number values converted to pixels.\n\nMultiple arguments are merged into a single property list, giving you two of the benefits of using a CSS pre-processor like LESS:\n\n#### 1. Rules can be nested with child rules, so that the following are identical:\n\n```javascript\nSTYLE({type: \"text/css\"},\n  RULE(\"a\", {color: \"red\"},\n    RULE(\"img\", {borderWidth: 0})\n  )\n)\n```\n\n```javascript\nSTYLE({type: \"text/css\"},\n  RULE(\"a\", {color: \"red\"}),\n  RULE(\"a img\", {borderWidth: 0})\n)\n```\n\n#### 2. Plain functions can be used as mix-ins, to minimize common CSS repetition:\n\n```javascript\nfunction roundedCorners(radius) {\n  return {\n    borderRadius       : radius,\n    WebkitBorderRadius : radius,\n    MozBorderRadius    : radius\n  }\n}\n\nSTYLE({type: \"text/css\"},\n  RULE(\"h1\", roundedCorners(10)),\n  RULE(\"h2\", roundedCorners(5))\n)\n```\n\nUsing domo on the server\n------------------------\n\ndomo really shines when used to build DOM code on the client. But since you'll likely need to render an HTML client in the first place, domo also ships with a [window.document shim](https://github.com/jed/domo/blob/master/document.js) that can be used to render HTML on the server. It's a small (under 1KB minizipped) mock DOM implementation with just enough logic to render HTML.\n\nOnce you've run `npm install domo`, the API for the server is the same as that for the client. Just `require(\"domo\")`, create a DOM, and then use the `outerHTML` property to serialize it into HTML. domo also adds a top-level `DOCUMENT` function for creating an entire HTML document with doctype, like this:\n\n```javascript\nrequire(\"domo\")\n\nvar document =\n\nDOCUMENT({type: \"html\"}\n  HTML(\n    HEAD(\n      SCRIPT({src: \"/app.js\"})\n    ),\n    BODY(\"Loading...\")\n  )\n)\n\nconsole.log(document.outerHTML)\n```\n\nwhich would render into this:\n\n```html\n<!DOCTYPE html>\n<html><head><script src=\"/app.js\"></script></head><body>Loading...</body></html>\n```\n\nSome things to note about using domo on the server:\n\n- The attributes passed to `DOCUMENT` are optional, with the `type` attribute defaulting to `html`.\n- All text node strings and attribute values are HTML-escaped.\n- The `outerHTML` is available on the document and every element, and is a lazy ES5 getter that calls `toString()` for performance.\n","scripts":{"build":"node build.js"},"_npmUser":{"name":"jed","email":"tr@nslator.jp"},"repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.1.65","description":"Markup, style, and code in one language.","directories":{},"readmeFilename":"README.md","devDependencies":{"uglify-js":"~1.3.4","coffee-script":"~1.4.0"}},"0.5.3":{"name":"domo","version":"0.5.3","keywords":["dom","html","css","template","browser","server"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.5.3","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"5bdbc318d8a8cc2208a5ee4e9ff14e2d8169bcb3","tarball":"https://registry.npmjs.org/domo/-/domo-0.5.3.tgz","integrity":"sha512-RoCXzGEIvb7TDOx6bhENLmcH4NzljljztBqnbAliJzEseJj1dfkv7WPoWBGDH1OgdGTwEoQTdd7FVM2dM0kt+Q==","signatures":[{"sig":"MEQCIDeX0+wKl5d6gC/Bphw75KAZB1pjvtLauBpXRpiHhaN1AiAixxFHy7XX1qCAnoTztsj84KAoRwL0O4fzTmy5F7SMfw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","readme":"dōmo: Markup, style, and code in one language\n=============================================\n\ndōmo lets you write HTML markup CSS styles in JavaScript syntax, in the browser and on the server. At **less than 1.3kb** of minizipped JavaScript, dōmo is a simpler, easier, and more reliable alternative to template engines and CSS pre-processors. And it works well with all the tools you already use, from jQuery to Backbone.js to CoffeeScript.\n\nTo learn more about dōmo, head over to [the documentation](http://domo-js.com).\n","scripts":{"build":"node build.js"},"_npmUser":{"name":"jed","email":"tr@nslator.jp"},"repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.1.65","description":"Markup, style, and code in one language.","directories":{},"readmeFilename":"README.md","devDependencies":{"uglify-js":"~1.3.4","coffee-script":"~1.4.0"}},"0.5.4":{"name":"domo","version":"0.5.4","keywords":["dom","html","css","template","browser","server"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.5.4","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"9de678b4a745876538e46d8aa0be3528ab7b26c9","tarball":"https://registry.npmjs.org/domo/-/domo-0.5.4.tgz","integrity":"sha512-SRoGyPd/9pGweb24lriLFesGpkkqF4e7vH7VhLon+68ZONsqQ1tMyyF/gIZ+k1WGfqhU2K5DtEuZ11hsYVB3SA==","signatures":[{"sig":"MEYCIQCRqanxdZCfI3XbzkoJ9w+mFqVyLk51HzG/e2dUUY0vigIhANT7p5G21jUvLNSbIRL+SqLT0xIeqq3fhL1CDchboWZd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","readme":"dōmo: Markup, style, and code in one language\n=============================================\n\ndōmo lets you write HTML markup CSS styles in JavaScript syntax, in the browser and on the server. At **less than 1.3kb** of minizipped JavaScript, dōmo is a simpler, easier, and more reliable alternative to template engines and CSS pre-processors. And it works well with all the tools you already use, from jQuery to Backbone.js to CoffeeScript.\n\nTo learn more about dōmo, head over to [the documentation](http://domo-js.com).\n","scripts":{"build":"node build.js"},"_npmUser":{"name":"jed","email":"tr@nslator.jp"},"repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.1.65","description":"Markup, style, and code in one language.","directories":{},"readmeFilename":"README.md","devDependencies":{"uglify-js":"~1.3.4","coffee-script":"~1.4.0"}},"0.5.5":{"name":"domo","version":"0.5.5","keywords":["dom","html","css","template","browser","server"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.5.5","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"da8ef51697e7bbefd0f188c9554ba2317def177e","tarball":"https://registry.npmjs.org/domo/-/domo-0.5.5.tgz","integrity":"sha512-Z5t6vqbz1ZUSVEVGEfTt66HajkWMIzgkibJvp1qWPkk0BVfgpSKJpuVE0zRzbh7VjR0828dQY5uUgjxgqbGDMg==","signatures":[{"sig":"MEYCIQClevKwu3vAdtxHnZUu6N9vX9IVUJhFxX//tOnV2fEB8wIhAKkkdo1aHqJy0Bt16XnnglZVSIebtORI6mcwyyREuoQ0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","readme":"dōmo: Markup, style, and code in one language\n=============================================\n\ndōmo lets you write HTML markup CSS styles in JavaScript syntax, in the browser and on the server. At **less than 1.3kb** of minizipped JavaScript, dōmo is a simpler, easier, and more reliable alternative to template engines and CSS pre-processors. And it works well with all the tools you already use, from jQuery to Backbone.js to CoffeeScript.\n\nTo learn more about dōmo, head over to [the documentation](http://domo-js.com).\n","scripts":{"build":"node build.js"},"_npmUser":{"name":"jed","email":"tr@nslator.jp"},"repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.1.65","description":"Markup, style, and code in one language.","directories":{},"readmeFilename":"README.md","devDependencies":{"uglify-js":"~1.3.4","coffee-script":"~1.4.0"}},"0.5.6":{"name":"domo","version":"0.5.6","keywords":["dom","html","css","template","browser","server"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.5.6","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"d367cf18547798484ae8113725986175c98a9220","tarball":"https://registry.npmjs.org/domo/-/domo-0.5.6.tgz","integrity":"sha512-M9rBrYaDyyfsW56vG1TCRVd6J8CcH2aIxMCmCqBiewJQGUaR5kKFYX1apdJalM1hpSwxezCdox2WXszYcNU52A==","signatures":[{"sig":"MEUCIDhVC7qq6YwfuOKYiRs3e+DPZWe1zyaRfK2b/xpucGiLAiEAqX7LvlEDSl9tmx2W4g0rL6CHC6BnOtvaZyP+gW0MowI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","readme":"dōmo: Markup, style, and code in one language\n=============================================\n\ndōmo lets you write HTML markup CSS styles in JavaScript syntax, in the browser and on the server. At **less than 1.3kb** of minizipped JavaScript, dōmo is a simpler, easier, and more reliable alternative to template engines and CSS pre-processors. And it works well with all the tools you already use, from jQuery to Backbone.js to CoffeeScript.\n\nTo learn more about dōmo, head over to [the documentation](http://domo-js.com).\n","scripts":{"build":"node build.js"},"_npmUser":{"name":"jed","email":"tr@nslator.jp"},"browserify":"lib/domo.js","repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.1.65","description":"Markup, style, and code in one language.","directories":{},"readmeFilename":"README.md","devDependencies":{"uglify-js":"~1.3.4","coffee-script":"~1.4.0"}},"0.5.7":{"name":"domo","version":"0.5.7","keywords":["dom","html","css","template","browser","server"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.5.7","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"0e86b012319be6e2752be3bfea921929d76f485e","tarball":"https://registry.npmjs.org/domo/-/domo-0.5.7.tgz","integrity":"sha512-4HKb5xMyhnUAWqQ9J3BV86Qob2xIt6M0ahG6YRThU67jexdaXDdg2EKc3Wck7F8DsiTDcbtrGXlb08ibnAjTPQ==","signatures":[{"sig":"MEYCIQDioljJ66+LjvnbJyx7ckYOaOTUCJPUxwNg7m8aC1iCdgIhANpnYxrqerI6cVdk4IZl9nMSb4EAZK9gZW5B010t+vjR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","readme":"dōmo: Markup, style, and code in one language\n=============================================\n\ndōmo lets you write HTML markup CSS styles in JavaScript syntax, in the browser and on the server. At **less than 1.4kb** of minizipped JavaScript, dōmo is a simpler, easier, and more reliable alternative to template engines and CSS pre-processors. And it works well with all the tools you already use, from jQuery to Backbone.js to CoffeeScript.\n\nTo learn more about dōmo, head over to [the documentation](http://domo-js.com).\n","scripts":{"build":"node build.js"},"_npmUser":{"name":"jed","email":"tr@nslator.jp"},"browserify":"lib/domo.js","repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.1.65","description":"Markup, style, and code in one language.","directories":{},"readmeFilename":"README.md","devDependencies":{"uglify-js":"~1.3.4","coffee-script":"~1.4.0"}},"0.5.8":{"name":"domo","version":"0.5.8","keywords":["dom","html","css","template","browser","server"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.5.8","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"d1dd5938ea4e5286266b6b6661fa441bc4651bac","tarball":"https://registry.npmjs.org/domo/-/domo-0.5.8.tgz","integrity":"sha512-0mhoW0opdW4bmUkS1vrlE3TdVfw/RC7S5kpHkIETI4DEcyujlGUzYPDIxYdwf6Ni5ywwTYGW/8BysaaxOZZzsg==","signatures":[{"sig":"MEUCIQCBQLaZntAovpu5rhDbW2hqbol4f9miqSVpPyl15ymhmgIgP84h7jqNGCOiBu0zWX6MuZSblKHzj6OTZmdjC2sMDRg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","readme":"dōmo: Markup, style, and code in one language\n=============================================\n\ndōmo lets you write HTML markup CSS styles in JavaScript syntax, in the browser and on the server. At **less than 1.4kb** of minizipped JavaScript, dōmo is a simpler, easier, and more reliable alternative to template engines and CSS pre-processors. And it works well with all the tools you already use, from jQuery to Backbone.js to CoffeeScript.\n\nTo learn more about dōmo, head over to [the documentation](http://domo-js.com).\n","scripts":{"build":"node build.js"},"_npmUser":{"name":"jed","email":"tr@nslator.jp"},"browserify":"lib/domo.js","repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.1.69","description":"Markup, style, and code in one language.","directories":{},"readmeFilename":"README.md","devDependencies":{"uglify-js":"~1.3.4","coffee-script":"~1.4.0"}},"0.5.9":{"name":"domo","version":"0.5.9","keywords":["dom","html","css","template","browser","server"],"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","_id":"domo@0.5.9","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"dist":{"shasum":"dc9ccf45891fa965a4214e4b6fc8a8c5aeaefb5d","tarball":"https://registry.npmjs.org/domo/-/domo-0.5.9.tgz","integrity":"sha512-XUTSzYSzN+hV7mYeSeyrrBmu7Okfxc13HcMjLZbuesO4p6d3aQfjVNnhMG3kpFx0S71tH3GBmfjP4F8aFDinjA==","signatures":[{"sig":"MEYCIQCbf07IaJrJd36eZUBTo/SXJwvSq3nIYQiUK5IXmOIDIwIhAISd6PFX4irmEzF0+h0bJrDMaDmp+Bjn86pazZyLWPcG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","readme":"dōmo: Markup, style, and code in one language\n=============================================\n\ndōmo lets you write HTML markup CSS styles in JavaScript syntax, in the browser and on the server. At **less than 1.4kb** of minizipped JavaScript, dōmo is a simpler, easier, and more reliable alternative to template engines and CSS pre-processors. And it works well with all the tools you already use, from jQuery to Backbone.js to CoffeeScript.\n\nTo learn more about dōmo, head over to [the documentation](http://domo-js.com).\n","scripts":{"build":"node build.js"},"_npmUser":{"name":"jed","email":"tr@nslator.jp"},"browserify":"lib/domo.js","repository":{"url":"https://github.com/jed/domo.git","type":"git"},"_npmVersion":"1.2.18","description":"Markup, style, and code in one language.","directories":{},"readmeFilename":"README.md","devDependencies":{"uglify-js":"~1.3.4","coffee-script":"~1.4.0"}}},"time":{"created":"2012-10-30T15:46:30.022Z","modified":"2025-10-29T10:12:57.404Z","0.3.0":"2012-10-30T15:46:32.934Z","0.4.0":"2012-10-31T07:54:19.284Z","0.4.2":"2012-10-31T08:12:16.351Z","0.4.3":"2012-10-31T08:25:14.718Z","0.4.4":"2012-10-31T09:16:57.407Z","0.5.0":"2012-11-02T13:23:34.743Z","0.5.1":"2012-11-06T07:42:38.474Z","0.5.2":"2012-11-09T16:20:45.853Z","0.5.3":"2012-11-14T02:37:17.249Z","0.5.4":"2012-11-14T03:01:55.041Z","0.5.5":"2012-11-14T14:24:09.046Z","0.5.6":"2012-11-15T08:52:43.059Z","0.5.7":"2012-11-15T14:26:53.646Z","0.5.8":"2012-12-26T14:12:31.798Z","0.5.9":"2013-04-27T14:48:08.118Z"},"author":{"name":"Jed Schmidt","email":"tr@nslator.jp"},"license":"MIT","keywords":["dom","html","css","template","browser","server"],"repository":{"url":"https://github.com/jed/domo.git","type":"git"},"description":"Markup, style, and code in one language.","maintainers":[{"email":"andrei@laye.red","name":"andreiigna"}],"readme":"domo\n=====\n\ndomo is a DSL (DOM-specific language) that unifies HTML markup and CSS style into JavaScript syntax, by providing global functions for HTML5 elements and CSS declarations. To see it in action, head over to [JSBin](http://jsbin.com/egapim/1/edit). Available [here](https://raw.github.com/jed/domo/master/domo.js) or on [npm](https://npmjs.org/package/domo).\n\nFeatures\n--------\n\n- Most of what you'd want from HAML or LESS, in pure JavaScript.\n- Small, dependency-free footprint (around 1KB minizipped).\n- Straight from JS to DOM without HTML reduces XSS attack vectors.\n- Sugars well with (but completely agnostic to) CoffeeScript.\n\nNot convinced? Read a [more detailed pitch](https://gist.github.com/3916350).\n\nExample\n-------\n\n```html\n<!doctype html>\n<script>\n  document.replaceChild(\n\n  HTML({lang: \"en\"},\n    HEAD(\n      TITLE(\"Hello, world\"),\n      STYLE({type: \"text/css\"},\n        CSS(\"#container\",\n          {backgroundColor: \"#eee\"},\n          roundedCorners(5)\n        )\n      )\n    ),\n\n    BODY(\n      DIV({id: \"container\"},\n        \"For more details about domo, see the source: \",\n        A({href: \"//github.com/jed/domo/blob/master/domo.js\"}, \"View source\")\n      )\n    )\n  )\n\n  , document.documentElement)\n\n  function roundedCorners(radius) {\n    return {\n      borderRadius       : radius,\n      WebkitBorderRadius : radius,\n      MozBorderRadius    : radius\n    }\n  }\n</script>\n```\n\nAPI\n---\n\ndomo provides functions for CSS rules and HTML5 element types, allowing you to create DOM objects anywhere in your code without compiling templates from separate `script` tags.\n\n### domo.noConflict()\n\nBy default, domo extends the global object (`window` in the browser or `global` in node) with itself and all of its DOM/CSS functions. This allows you to access them directly, and write code that behaves like a DSL, but without any compilation step.\n\nIf polluting the global namespace isn't your style, you can call `domo.noConflict()`. This function restores all overwritten global object properties and returns the original namespace, much like its jQuery namesake.\n\n### domo.<element-name>([<attributes>], [<childNodes>...])\n\nThis returns a new DOM element of the specified name, with the optionally specified attributes, and child nodes.\n\n*element* can be any of the following valid HTML5 tag names: `A`, `ABBR`, `ACRONYM`, `ADDRESS`, `AREA`, `ARTICLE`, `ASIDE`, `AUDIO`, `B`, `BDI`, `BDO`, `BIG`, `BLOCKQUOTE`, `BODY`, `BR`, `BUTTON`, `CANVAS`, `CAPTION`, `CITE`, `CODE`, `COL`, `COLGROUP`, `COMMAND`, `DATALIST`, `DD`, `DEL`, `DETAILS`, `DFN`, `DIV`, `DL`, `DT`, `EM`, `EMBED`, `FIELDSET`, `FIGCAPTION`, `FIGURE`, `FOOTER`, `FORM`, `FRAME`, `FRAMESET`, `H1`, `H2`, `H3`, `H4`, `H5`, `H6`, `HEAD`, `HEADER`, `HGROUP`, `HR`, `HTML`, `I`, `IFRAME`, `IMG`, `INPUT`, `INS`, `KBD`, `KEYGEN`, `LABEL`, `LEGEND`, `LI`, `LINK`, `MAP`, `MARK`, `META`, `METER`, `NAV`, `NOSCRIPT`, `OBJECT`, `OL`, `OPTGROUP`, `OPTION`, `OUTPUT`, `P`, `PARAM`, `PRE`, `PROGRESS`, `Q`, `RP`, `RT`, `RUBY`, `SAMP`, `SCRIPT`, `SECTION`, `SELECT`, `SMALL`, `SOURCE`, `SPAN`, `SPLIT`, `STRONG`, `STYLE`, `SUB`, `SUMMARY`, `SUP`, `TABLE`, `TBODY`, `TD`, `TEXTAREA`, `TFOOT`, `TH`, `THEAD`, `TIME`, `TITLE`, `TR`, `TRACK`, `TT`, `UL`, `VAR`, `VIDEO`, or `WBR`.\n\nThe first argument is an optional attributes object, mapping camelCased attribute names to attribute values.\n\nAll subsequent arguments are optional and appended as child nodes, merging any array arguments. Each child is appended as is if it's already a node (has a `nodeType` property), or converted to a text node otherwise. This allows you to append any DOM node generated elsewhere.\n\n### domo.CSS(<selector>, [<properties>...])\n\nThis returns a CSS rule string with the specified selector and properties, for use in a stylesheet.\n\nThe first argument is a required string representing the CSS selector.\n\nAll subsequent arguments are optional objects mapping property names to property values. camelCased property names are converted to lower-case hyphenated names, and number values converted to pixels.\n\nMultiple arguments are merged into a single property list, giving you two of the benefits of using a CSS pre-processor like LESS:\n\n#### 1. Rules can be nested with child rules, so that the following are identical:\n\n```javascript\nSTYLE({type: \"text/css\"},\n  CSS(\"a\", {color: \"red\"},\n    CSS(\"img\", {borderWidth: 0})\n  )\n)\n```\n\n```javascript\nSTYLE({type: \"text/css\"},\n  CSS(\"a\", {color: \"red\"}),\n  CSS(\"a img\", {borderWidth: 0})\n)\n```\n\n#### 2. Plain functions can be used as mix-ins, to minimize common CSS repetition:\n\n```javascript\nfunction roundedCorners(radius) {\n  return {\n    borderRadius       : radius,\n    WebkitBorderRadius : radius,\n    MozBorderRadius    : radius\n  }\n}\n\nSTYLE({type: \"text/css\"},\n  CSS(\"h1\", roundedCorners(10)),\n  CSS(\"h2\", roundedCorners(5))\n)\n```\n","users":{"luk":true}}