Alimjan Yusan

kompasim

Hi there 👋 kompasim@163.com

icon



Learning


Tools


Packages


AI


Collections

1. knowledges

2. front-end

3. server-side

4. golang

5. others


Snippets

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>