Vinyl.isVinyl()#
确定对象是否为 Vinyl 实例。使用此方法代替 instanceof。
¥Determines if an object is a Vinyl instance. Use this method instead of instanceof.
注意:此方法使用一些旧版本的 Vinyl 未公开的内部属性,如果使用过时的版本,则会导致漏报。
¥Note: This method uses an internal property that some older versions of Vinyl didn't expose resulting in a false negative if using an outdated version.
用法#
¥Usage
签名#
¥Signature
参数#
¥Parameters
| 参数 | type | note |
|---|---|---|
| file | object | 要检查的对象。 |
返回#
¥Returns
如果 file 对象是 Vinyl 实例,则为 True。
¥True if the file object is a Vinyl instance.