Skip to content

Instantly share code, notes, and snippets.

const walk = (acc = [], outer) => {
if (typeof outer === null) {
return acc
}
if (typeof outer === 'string') {
if (outer === ' ') {
return acc
}
@jgusta
jgusta / tagfactory.js
Last active June 8, 2024 11:53
DOM Tag Factory
const ft = function (globalVariable) {
const dom = globalVariable || document
function selectEl(el) {
if (el.ELEMENT_NODE) {
return el
}
else {
return dom.querySelector(el)
}
}