@saltcorn/markup
Advanced tools
Comparing version
@@ -0,1 +1,6 @@ | ||
/** | ||
* @category saltcorn-markup | ||
* @module builder | ||
*/ | ||
const { | ||
@@ -19,2 +24,7 @@ p, | ||
/** | ||
* @param {object} rec | ||
* @param {object} csrf | ||
* @returns {object} | ||
*/ | ||
const addCsrf = (rec, csrf) => { | ||
@@ -25,5 +35,22 @@ rec.csrfToken = csrf; | ||
/** | ||
* @param {object} x | ||
* @returns {string} | ||
*/ | ||
const encode = (x) => encodeURIComponent(JSON.stringify(x)); | ||
module.exports = ( | ||
module.exports = | ||
/** | ||
* @param {object} opts | ||
* @param {object} opts.options | ||
* @param {object} opts.context | ||
* @param {object} opts.action | ||
* @param {string} opts.stepName | ||
* @param {object} opts.layout | ||
* @param {string} [opts.mode = "show"] | ||
* @param {object} opts | ||
* @param {object} csrfToken | ||
* @returns {div} | ||
*/ | ||
( | ||
{ options, context, action, stepName, layout, mode = "show", version_tag }, | ||
@@ -30,0 +57,0 @@ csrfToken |
@@ -0,1 +1,6 @@ | ||
/** | ||
* @category saltcorn-markup | ||
* @module emergency_layout | ||
*/ | ||
const { | ||
@@ -21,2 +26,8 @@ ul, | ||
/** | ||
* @param {string} title | ||
* @param {string|object} body | ||
* @param {object[]} alerts | ||
* @returns {string} | ||
*/ | ||
const renderBody = (title, body, alerts) => | ||
@@ -30,2 +41,13 @@ renderLayout({ | ||
/** | ||
* @param {object} opts | ||
* @param {string} opts.title | ||
* @param {object} opts.menu | ||
* @param {object} opts.brand | ||
* @param {object[]} opts.alerts | ||
* @param {string} opts.currentUrl | ||
* @param {string|object} opts.body | ||
* @param {object[]} opts.headers | ||
* @returns {string} | ||
*/ | ||
const wrap = ({ title, menu, brand, alerts, currentUrl, body, headers }) => | ||
@@ -32,0 +54,0 @@ navbar(brand, menu, currentUrl) + renderBody(title, body, alerts); |
93
form.js
@@ -0,1 +1,6 @@ | ||
/** | ||
* @category saltcorn-markup | ||
* @module form | ||
*/ | ||
const { | ||
@@ -16,3 +21,13 @@ p, | ||
const { isdef, select_options, search_bar } = require("./helpers"); | ||
/** | ||
* @param {string} s | ||
* @returns {string} | ||
*/ | ||
const rmInitialDot = (s) => (s && s[0] === "." ? s.replace(".", "") : s); | ||
/** | ||
* @param {object} sIf | ||
* @returns {string} | ||
*/ | ||
const mkShowIf = (sIf) => | ||
@@ -37,3 +52,16 @@ Object.entries(sIf) | ||
/** | ||
* @param {string} formStyle | ||
* @returns {boolean} | ||
*/ | ||
const isHoriz = (formStyle) => formStyle === "horiz"; | ||
/** | ||
* @param {object} hdr | ||
* @param {object} inner | ||
* @param {string} [error = ""] | ||
* @param {string} fStyle | ||
* @param {string} labelCols | ||
* @returns {div} | ||
*/ | ||
const formRowWrap = (hdr, inner, error = "", fStyle, labelCols) => | ||
@@ -72,2 +100,8 @@ div( | ||
/** | ||
* @param {object[]} v | ||
* @param {object[]} errors | ||
* @param {string} [nameAdd = ""] | ||
* @returns {function} | ||
*/ | ||
const innerField = (v, errors, nameAdd = "") => (hdr) => { | ||
@@ -169,2 +203,9 @@ const name = hdr.form_name + nameAdd; | ||
/** | ||
* @param {object[]} v | ||
* @param {object[]} errors | ||
* @param {string} formStyle | ||
* @param {object[]} labelCols | ||
* @returns {function} | ||
*/ | ||
const mkFormRow = (v, errors, formStyle, labelCols) => (hdr) => | ||
@@ -175,2 +216,10 @@ hdr.isRepeat | ||
/** | ||
* @param {object[]} v | ||
* @param {object[]} errors | ||
* @param {string} formStyle | ||
* @param {object[]} labelCols | ||
* @param {object} hdr | ||
* @returns {div} | ||
*/ | ||
const mkFormRowForRepeat = (v, errors, formStyle, labelCols, hdr) => { | ||
@@ -236,2 +285,9 @@ const adder = a( | ||
/** | ||
* @param {object} hdr | ||
* @param {string} name | ||
* @param {object} v | ||
* @param {string} extracls | ||
* @returns {*} | ||
*/ | ||
const displayEdit = (hdr, name, v, extracls) => { | ||
@@ -268,2 +324,10 @@ var fieldview; | ||
/** | ||
* @param {object[]} v | ||
* @param {object[]} errors | ||
* @param {string} formStyle | ||
* @param {string} labelCols | ||
* @param {string} [nameAdd = ""] | ||
* @returns {function} | ||
*/ | ||
const mkFormRowForField = (v, errors, formStyle, labelCols, nameAdd = "") => ( | ||
@@ -288,2 +352,6 @@ hdr | ||
/** | ||
* @param {object} form | ||
* @returns {string} | ||
*/ | ||
const renderFormLayout = (form) => { | ||
@@ -369,2 +437,7 @@ const blockDispatch = { | ||
/** | ||
* @param {string|object} form | ||
* @param {string|false} csrfToken0 | ||
* @returns {string} | ||
*/ | ||
const renderForm = (form, csrfToken0) => { | ||
@@ -413,2 +486,7 @@ const csrfToken = | ||
/** | ||
* @param {object} form | ||
* @param {string} csrfToken | ||
* @returns {string} | ||
*/ | ||
const mkFormWithLayout = (form, csrfToken) => { | ||
@@ -449,2 +527,7 @@ const hasFile = form.fields.some((f) => f.input_type === "file"); | ||
}; | ||
/** | ||
* @param {object[]} additionalButtons | ||
* @returns {string} | ||
*/ | ||
const displayAdditionalButtons = (additionalButtons) => | ||
@@ -459,2 +542,9 @@ additionalButtons | ||
.join(""); | ||
/** | ||
* @param {object} form | ||
* @param {string} csrfToken | ||
* @param {object} [errors = {}] | ||
* @returns {string} | ||
*/ | ||
const mkForm = (form, csrfToken, errors = {}) => { | ||
@@ -518,3 +608,4 @@ const hasFile = form.fields.some((f) => f.input_type === "file"); | ||
module.exports = contract( | ||
module.exports = | ||
contract( | ||
is.fun( | ||
@@ -521,0 +612,0 @@ [is.or(is.str, is.class("Form")), is.maybe(is.or(is.str, is.eq(false)))], |
@@ -0,1 +1,6 @@ | ||
/** | ||
* @category saltcorn-markup | ||
* @module helpers | ||
*/ | ||
const { | ||
@@ -13,4 +18,16 @@ a, | ||
/** | ||
* checks if x is defined | ||
* @param {*} x | ||
* @returns {boolean} | ||
*/ | ||
const isdef = (x) => typeof x !== "undefined"; | ||
/** | ||
* @param {object|string} v | ||
* @param {object} hdr | ||
* @param {boolean} force_required | ||
* @param {string} neutral_label | ||
* @returns {string} | ||
*/ | ||
const select_options = (v, hdr, force_required, neutral_label = "") => { | ||
@@ -42,2 +59,13 @@ const options0 = hdr.options || []; | ||
/** | ||
* | ||
* @param {object} opts | ||
* @param {string} opts.name | ||
* @param {object} [opts.options] | ||
* @param {string} opts.value | ||
* @param {object} opts.inline | ||
* @param {string} opts.form_name | ||
* @param {...*} opts.rest | ||
* @returns {string} | ||
*/ | ||
const radio_group = ({ name, options, value, inline, form_name, ...rest }) => | ||
@@ -70,2 +98,10 @@ div( | ||
/** | ||
* @param {object} opts | ||
* @param {number} opts.current_page | ||
* @param {number} opts.pages | ||
* @param {function} opts.get_page_link | ||
* @param {boolean} opts.trailing_ellipsis | ||
* @returns {string} | ||
*/ | ||
const pagination = ({ | ||
@@ -112,2 +148,8 @@ current_page, | ||
/** | ||
* @param {string} name | ||
* @param {object} v | ||
* @param {object} param2 | ||
* @returns {string} | ||
*/ | ||
const search_bar = ( | ||
@@ -114,0 +156,0 @@ name, |
68
index.js
@@ -0,1 +1,5 @@ | ||
/** | ||
* @category saltcorn-markup | ||
* @module saltcorn-markup/index | ||
*/ | ||
const renderForm = require("./form"); | ||
@@ -7,4 +11,29 @@ const renderBuilder = require("./builder"); | ||
/** | ||
* @param {string} href | ||
* @param {string} s | ||
* @returns {string} | ||
*/ | ||
const link = (href, s) => a({ href: text(href) }, text(s)); | ||
/** | ||
* @param {string} href | ||
* @param {string} s | ||
* @param {string} csrfToken | ||
* @param {object} opts | ||
* @param {string} [opts.btnClass = "btn-primary"] | ||
* @param {string} [opts.onClick] | ||
* @param {string} [opts.small] | ||
* @param {string} [opts.style] | ||
* @param {*} opts.ajax | ||
* @param {string} opts.reload_on_done | ||
* @param {string} opts.reload_delay | ||
* @param {string} [opts.klass = "btn-primary"] | ||
* @param {string} [opts.formClass] | ||
* @param {string} opts.spinner | ||
* @param {object} opts.req | ||
* @param {boolean} opts.confirm | ||
* @param {string} opts.icon | ||
* @returns {string} | ||
*/ | ||
const post_btn = ( | ||
@@ -51,7 +80,8 @@ href, | ||
}>${icon ? `<i class="${icon}"></i> ` : ""}${s}</button></form>`; | ||
/** | ||
/** | ||
* UI Form for Delete Item confirmation | ||
* @param href - href | ||
* @param req - Request | ||
* @param what - Item | ||
* @param {string} href - href | ||
* @param {string} req - Request | ||
* @param {string} what - Item | ||
* @returns {string} return html form | ||
@@ -72,2 +102,10 @@ */ | ||
/** | ||
* @param {string} href | ||
* @param {string} s | ||
* @param {object} req | ||
* @param {boolean} confirm | ||
* @param {string} what | ||
* @returns {string} | ||
*/ | ||
const post_dropdown_item = (href, s, req, confirm, what) => { | ||
@@ -89,2 +127,7 @@ const id = href.split("/").join(""); | ||
/** | ||
* @param {string} id | ||
* @param {*} elems | ||
* @returns {div} | ||
*/ | ||
const settingsDropdown = (id, elems) => | ||
@@ -114,2 +157,9 @@ div( | ||
/** | ||
* @param {Date} date | ||
* @param {object} opts | ||
* @param {string} [opts.hour = "2-digit"] | ||
* @param {string} [opts.minute = "2-digit"] | ||
* @returns {string} | ||
*/ | ||
const localeTime = (date, options = { hour: "2-digit", minute: "2-digit" }) => | ||
@@ -124,2 +174,7 @@ time( | ||
/** | ||
* @param {Date} date | ||
* @param {object} [options ={}] | ||
* @returns {string} | ||
*/ | ||
const localeDateTime = (date, options = {}) => | ||
@@ -134,2 +189,7 @@ time( | ||
/** | ||
* @param {Date} date | ||
* @param {object} [options = {}] | ||
* @returns {string} | ||
*/ | ||
const localeDate = (date, options = {}) => | ||
@@ -136,0 +196,0 @@ time( |
@@ -0,1 +1,6 @@ | ||
/** | ||
* @category saltcorn-markup | ||
* @module layout_utils | ||
*/ | ||
const { | ||
@@ -21,4 +26,13 @@ ul, | ||
/** | ||
* @param {string} item | ||
* @returns {string} | ||
*/ | ||
const labelToId = (item) => text(item.replace(" ", "")); | ||
/** | ||
* @param {string} currentUrl | ||
* @param {object} item | ||
* @returns {boolean} | ||
*/ | ||
const active = (currentUrl, item) => | ||
@@ -29,2 +43,6 @@ (item.link && currentUrl.startsWith(item.link)) || | ||
/** | ||
* @param {object[]} sections | ||
* @returns {object[]} | ||
*/ | ||
const innerSections = (sections) => { | ||
@@ -40,2 +58,10 @@ var items = []; | ||
/** | ||
* @param {object} opts | ||
* @param {string} opts.label | ||
* @param {object[]} opts.subitems | ||
* @param {string} [opts.icon] | ||
* @param {boolean} opts.isUser | ||
* @returns {li} | ||
*/ | ||
const navSubitems = ({ label, subitems, icon, isUser }) => | ||
@@ -71,2 +97,8 @@ li( | ||
); | ||
/** | ||
* @param {string} currentUrl | ||
* @param {object[]} sections | ||
* @returns {div} | ||
*/ | ||
const rightNavBar = (currentUrl, sections) => | ||
@@ -102,5 +134,16 @@ div( | ||
/** | ||
* @param {object[]} sections | ||
* @returns {boolean} | ||
*/ | ||
const hasMobileItems = (sections) => | ||
innerSections(sections).some((s) => s.location === "Mobile Bottom"); | ||
/** | ||
* @param {string} currentUrl | ||
* @param {object[]} sections | ||
* @param {string} [cls = ""] | ||
* @param {string} [clsLink = ""] | ||
* @returns {footer|string} | ||
*/ | ||
const mobileBottomNavBar = (currentUrl, sections, cls = "", clsLink = "") => | ||
@@ -142,2 +185,8 @@ hasMobileItems(sections) | ||
/** | ||
* @param {object} opts | ||
* @param {string} opts.name | ||
* @param {string} opts.logo | ||
* @returns {string[]} | ||
*/ | ||
const leftNavBar = ({ name, logo }) => [ | ||
@@ -171,2 +220,10 @@ a( | ||
/** | ||
* @param {object} brand | ||
* @param {object[]} sections | ||
* @param {string} currentUrl | ||
* @param {object} opts | ||
* @param {boolean} [opts.fixedTop = true] | ||
* @returns {string} | ||
*/ | ||
const navbar = (brand, sections, currentUrl, opts = { fixedTop: true }) => | ||
@@ -187,2 +244,7 @@ nav( | ||
/** | ||
* @param {string} type | ||
* @param {string} s | ||
* @returns {string} | ||
*/ | ||
const alert = (type, s) => { | ||
@@ -200,2 +262,6 @@ //console.log("alert", type, s,s.length) | ||
}; | ||
/** | ||
* @returns {string} | ||
*/ | ||
const navbarSolidOnScroll = script( | ||
@@ -211,2 +277,7 @@ domReady(`$(window).scroll(function () { | ||
/** | ||
* @param {object} x | ||
* @param {object} s | ||
* @returns {object} | ||
*/ | ||
const logit = (x, s) => { | ||
@@ -218,2 +289,6 @@ if (s) console.log(s, x); | ||
/** | ||
* @param {number} len | ||
* @returns {function} | ||
*/ | ||
const standardBreadcrumbItem = (len) => ({ href, text }, ix) => | ||
@@ -228,2 +303,8 @@ li( | ||
/** | ||
* @param {object} opts | ||
* @param {Workflow} opts.workflow | ||
* @param {object} opts.step | ||
* @returns {string} | ||
*/ | ||
const workflowBreadcrumbItem = ({ workflow, step }) => | ||
@@ -244,2 +325,6 @@ workflow.steps | ||
/** | ||
* @param {object[]} crumbs | ||
* @returns {string} | ||
*/ | ||
const breadcrumbs = (crumbs) => | ||
@@ -258,2 +343,6 @@ nav( | ||
/** | ||
* @param {object[]} headers | ||
* @returns {string} | ||
*/ | ||
const headersInHead = (headers) => | ||
@@ -273,2 +362,6 @@ headers | ||
/** | ||
* @param {object[]} headers | ||
* @returns {string} | ||
*/ | ||
const headersInBody = (headers) => | ||
@@ -291,2 +384,6 @@ headers | ||
/** | ||
* @param {object[]} tabList | ||
* @returns {ul} | ||
*/ | ||
const cardHeaderTabs = (tabList) => | ||
@@ -293,0 +390,0 @@ ul( |
@@ -0,1 +1,6 @@ | ||
/** | ||
* @category saltcorn-markup | ||
* @module layout | ||
*/ | ||
const { contract, is } = require("contractis"); | ||
@@ -25,4 +30,13 @@ const { | ||
/** | ||
* @param {object[]} [alerts] | ||
* @returns {boolean} | ||
*/ | ||
const couldHaveAlerts = (alerts) => alerts || Array.isArray(alerts); | ||
/** | ||
* @param {string|object} body | ||
* @param {object[]} [alerts] | ||
* @returns {object} | ||
*/ | ||
const makeSegments = (body, alerts) => { | ||
@@ -50,2 +64,9 @@ const alertsSegments = couldHaveAlerts(alerts) | ||
}; | ||
/** | ||
* | ||
* @param {object} segment | ||
* @param {string} inner | ||
* @returns {div|span|string} | ||
*/ | ||
const applyTextStyle = (segment, inner) => { | ||
@@ -75,2 +96,11 @@ let style = segment.font ? { fontFamily: segment.font } : {}; | ||
/** | ||
* @param {object} opts | ||
* @param {object[]} opts.contents | ||
* @param {string[]} opts.titles | ||
* @param {string} opts.tabsStyle | ||
* @param {*} opts.ntabs | ||
* @param {function} go | ||
* @returns {ul_div} | ||
*/ | ||
const renderTabs = ({ contents, titles, tabsStyle, ntabs }, go) => { | ||
@@ -155,2 +185,12 @@ const rndid = `tab${Math.floor(Math.random() * 16777215).toString(16)}`; | ||
}; | ||
/** | ||
* @param {object} opts | ||
* @param {object} opts.blockDispatch | ||
* @param {object|string} opts.layout | ||
* @param {object} [opts.role] | ||
* @param {object[]} [opts.alerts] | ||
* @param {boolean} opts.is_owner missing in contract | ||
* @returns {string} | ||
*/ | ||
const render = ({ blockDispatch, layout, role, alerts, is_owner }) => { | ||
@@ -164,8 +204,7 @@ //console.log(JSON.stringify(layout, null, 2)); | ||
return segment.labelFor | ||
? iconTag + | ||
label( | ||
{ for: `input${text(segment.labelFor)}` }, | ||
applyTextStyle(segment, inner) | ||
) | ||
: iconTag + applyTextStyle(segment, inner); | ||
? label( | ||
{ for: `input${text(segment.labelFor)}` }, | ||
applyTextStyle(segment, iconTag + inner) | ||
) | ||
: applyTextStyle(segment, iconTag + inner); | ||
} | ||
@@ -511,3 +550,3 @@ function go(segment, isTop, ix) { | ||
markup = div( | ||
{ class: "row" }, | ||
{ class: "row w-100" }, | ||
segment.besides.map((t, ixb) => | ||
@@ -514,0 +553,0 @@ div( |
@@ -36,5 +36,5 @@ const render = require("./layout"); | ||
expect(render({ blockDispatch, layout: markup })).toBe( | ||
'<div class="row"><div class="col-6">hello</div><div class="col-6">world</div></div><div class="row"><div class="col-6">bar</div><div class="col-6">foo</div></div>' | ||
'<div class="row w-100"><div class="col-6">hello</div><div class="col-6">world</div></div><div class="row w-100"><div class="col-6">bar</div><div class="col-6">foo</div></div>' | ||
); | ||
}); | ||
}); |
41
mktag.js
@@ -0,7 +1,25 @@ | ||
/** | ||
* @category saltcorn-markup | ||
* @module mktag | ||
*/ | ||
//https://stackoverflow.com/a/54246501 | ||
/** | ||
* @param {string} str | ||
* @returns {string} | ||
*/ | ||
const camelToCssCase = (str) => | ||
str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`); | ||
/** | ||
* @param {string|object} cs | ||
* @returns {string} | ||
*/ | ||
const ppClasses = (cs) => | ||
typeof cs === "string" ? cs : !cs ? "" : cs.filter((c) => c).join(" "); | ||
/** | ||
* @param {string|object} c | ||
* @returns {string} | ||
*/ | ||
const ppClass = (c) => { | ||
@@ -11,2 +29,7 @@ const clss = ppClasses(c); | ||
}; | ||
/** | ||
* @param {string|string[]|object} [cs] | ||
* @returns {string} | ||
*/ | ||
const ppStyles = (cs) => | ||
@@ -24,2 +47,7 @@ typeof cs === "string" | ||
: ""; | ||
/** | ||
* @param {string|string[]|object} [cs] | ||
* @returns {string} | ||
*/ | ||
const ppStyle = (c) => { | ||
@@ -29,2 +57,9 @@ const clss = ppStyles(c); | ||
}; | ||
/** | ||
* @param {object[]} opts | ||
* @param {string} opts.k | ||
* @param {boolean} [opts.v] | ||
* @returns {string} | ||
*/ | ||
const ppAttrib = ([k, v]) => | ||
@@ -42,2 +77,8 @@ typeof v === "boolean" | ||
: `${k}="${v}"`; | ||
/** | ||
* @param {string} tnm | ||
* @param {boolean} voidTag | ||
* @returns {function} | ||
*/ | ||
const mkTag = (tnm, voidTag) => (...args) => { | ||
@@ -44,0 +85,0 @@ var body = ""; |
{ | ||
"name": "@saltcorn/markup", | ||
"version": "0.6.1-beta.0", | ||
"version": "0.6.1-beta.1", | ||
"description": "Markup for Saltcorn, open-source no-code platform", | ||
@@ -5,0 +5,0 @@ "homepage": "https://saltcorn.com", |
22
table.js
@@ -0,1 +1,6 @@ | ||
/** | ||
* @category saltcorn-markup | ||
* @module table | ||
*/ | ||
const { contract, is } = require("contractis"); | ||
@@ -18,2 +23,7 @@ | ||
const { pagination } = require("./helpers"); | ||
/** | ||
* @param {object} hdr | ||
* @returns {th} | ||
*/ | ||
const headerCell = (hdr) => | ||
@@ -29,2 +39,9 @@ th( | ||
/** | ||
* @function | ||
* @param {object[]} hdrs | ||
* @param {object[]} vs | ||
* @param {object} [opts] | ||
* @returns {string} | ||
*/ | ||
const mkTable = contract( | ||
@@ -84,2 +101,7 @@ is.fun( | ||
/** | ||
* @param {object} opts | ||
* @param {object} v | ||
* @returns {object} | ||
*/ | ||
const mkClickHandler = (opts, v) => { | ||
@@ -86,0 +108,0 @@ var attrs = {}; |
13
tabs.js
@@ -0,5 +1,18 @@ | ||
/** | ||
* @category saltcorn-markup | ||
* @module tabs | ||
*/ | ||
const { a, text, div, ul, li } = require("./tags"); | ||
/** | ||
* @param {string} str | ||
* @returns {string} | ||
*/ | ||
const mkId = (str) => text(str.split(" ").join("_")); | ||
/** | ||
* @param {object} obj | ||
* @returns {object} | ||
*/ | ||
const tabs = (obj) => { | ||
@@ -6,0 +19,0 @@ const entries = Array.isArray(obj) ? obj : Object.entries(obj); |
28
tags.js
@@ -0,1 +1,6 @@ | ||
/** | ||
* @category saltcorn-markup | ||
* @module tags | ||
*/ | ||
const xss = require("xss"); | ||
@@ -8,2 +13,6 @@ const escape = require("escape-html"); | ||
//https://stackoverflow.com/a/59220393 | ||
/** | ||
* @param {string} js | ||
* @returns {string} | ||
*/ | ||
const domReady = (js) => | ||
@@ -14,5 +23,17 @@ `(function(f){if (document.readyState === "complete") f(); else document.addEventListener('DOMContentLoaded',f,false)})(function(){${js}});`; | ||
/** | ||
* @param {string|number} t | ||
* @returns {string} | ||
*/ | ||
const text = (t) => (t === 0 ? "0" : xss(t)); | ||
/** | ||
* @param {string|number} t | ||
* @returns {string} | ||
*/ | ||
const text_attr = (t) => (t === 0 ? "0" : escape(t)); | ||
/** | ||
* @return {string[]} | ||
*/ | ||
const allTags = Object.fromEntries( | ||
@@ -24,2 +45,7 @@ htmlTags.map((tag) => [tag, mkTag(tag, voidHtmlTags.has(tag))]) | ||
...allTags, | ||
/** | ||
* @param {string} tagName | ||
* @param {...*} rest | ||
* @returns {string} | ||
*/ | ||
genericElement: (tagName, ...rest) => mkTag(tagName, false)(...rest), | ||
@@ -29,4 +55,6 @@ domReady, | ||
text_attr, | ||
/** @type {string} */ | ||
nbsp: " ", | ||
/** @type {module:mktag} */ | ||
mkTag, | ||
}; |
73590
13%2627
20.95%