Closed juliet-zhu closed 5 years ago
The documentation is phrased incorrectly. If something is set in the constructor, it'll be set on the clone because this.constructor()
is called at https://github.com/gulpjs/vinyl/blob/master/index.js#L123 and anything on the prototype is also going to be there for the same reasons. The isCustomProp stuff is only to prevent someone from doing new Vinyl({ foo: "something" })
and overwrite a prop you assigned internally.
Much clear now. Thanks a lot.
Glad that helped. I've updated the docs with my above explanation.
Hi, in README.md [https://github.com/gulpjs/vinyl#extending-vinyl]
From my understanding,
foo
or_foo
should not be insuperIns
andsuperInsCopy
instacnes, but I still can query them.