diff --git a/src/index.js b/src/index.js index 0cb1f35..fc75276 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,5 @@ -import tag from "./tag.js"; +import h from "./tag.js"; import app from "./app.js"; export {app}; -/** exports tag as h */ -export const h = tag; +export {h}; diff --git a/src/tag.js b/src/tag.js index 2669ab0..4dfa215 100644 --- a/src/tag.js +++ b/src/tag.js @@ -1,12 +1,14 @@ /** - * Creates new DOM element(s) from tag name(s) and attributes + * HTML Tag Scripting Function * - * @param {string} tag - tag to create - * @param {...any} args - attributes and/or child tag elements + * creates new DOM element(s) from tag name(s) and attributes + * + * @param {String} tag - tag to create + * @param {*} args - attributes and/or child tag elements * * @returns {HTMLElement} The created DOM element(s) */ -export default function tag(tag, ...args) { +export default function h(tag, ...args) { const el = document.createElement(tag); // support all scalar values as TextNodes