TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Metaprogramming with ECMAScript 6 proxies

46 点作者 riccardoforina超过 10 年前

1 comment

AnkhMorporkian超过 10 年前
This is huge.<p><pre><code> var proto = new Proxy({}, { get(target, propertyKey, receiver) { console.log(&#x27;GET &#x27;+propertyKey); return target[propertyKey]; }}); </code></pre> I&#x27;ve been following ES6 pretty closely, but somehow I missed this huge feature. Don&#x27;t get me wrong, I love generators and destructuring, but this is soooo cool.
评论 #8725794 未加载
评论 #8731401 未加载