GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Docs: Add Vinyl.isVinyl() documentation · gulpjs/gulp@25a22bf

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • docs/api
    • vinyl-isvinyl.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎docs/api/vinyl-isvinyl.md‎

Copy file name to clipboard
+41Lines changed: 41 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!-- front-matter
2+
id: api-vinyl-isvinyl
3+
title: Vinyl.isVinyl()
4+
hide_title: true
5+
sidebar_label: Vinyl.isVinyl()
6+
-->
7+
8+
# Vinyl.isVinyl()
9+
10+
Determines if an object is a Vinyl instance. Use this method instead of `instanceof`.
11+
12+
**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.
13+
14+
## Usage
15+
16+
```js
17+
const Vinyl = require('vinyl');
18+
19+
const file = new Vinyl();
20+
const notAFile = {};
21+
22+
Vinyl.isVinyl(file) === true;
23+
Vinyl.isVinyl(notAFile) === false;
24+
```
25+
26+
## Signature
27+
28+
```js
29+
Vinyl.isVinyl(file);
30+
```
31+
32+
### Parameters
33+
34+
| parameter | type | note |
35+
|:--------------:|:------:|-------|
36+
| file | object | The object to check. |
37+
38+
### Returns
39+
40+
True if the `file` object is a Vinyl instance.
41+

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.