gulpjs / vinyl

Virtual file format.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unique ID

phated opened this issue · comments

I was working on option resolution consolidation in vinyl-fs (gulpjs/vinyl-fs#239) and found that it would be really helpful to have a unique ID on each vinyl object.

@contra @erikkemperman thoughts?

Would this be a breaking change because someone might have been assigning an id property to the object already?

I think it's probably just better for us to use a WeakMap shim (which attaches a unique key to the object) instead of making this change to the API.