Hi there 👋 kompasim@163.com
let tags = new Proxy((name, ...args) => {
return `<${name}>${args}</${name}>`;
}, {
get: (target, name) => {
return target.bind(null, name);
}
})
const {div} = tags;
console.log(tags("div", "content...")); // <div>content...</div>
console.log(div("content...")); // <div>content...</div>