gulpjs / vinyl

Virtual file format.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use ES2015 Proxies

phated opened this issue · comments

I wanted to open this issue as a place to track things we could use Proxies to implement.

  • Currently, unsetting base to fallback to cwd requires setting base to null or undefined. With Proxies, I believe we could watch for delete file.base and unset it.
  • We could probably do some cool stat stuff with Proxies. Not sure what though.

More information about Proxies at https://github.com/mikaelbr/proxy-fun

In the docs, we currently tell people to treat history and it's properties as read-only. I think we could enforce this with proxies.

Yeah, that would be a great use for a proxy here.