is-vfile-message
v1.0.0
Published
Check if a value is a VFileMessage object
Downloads
5
Maintainers
Readme
is-vfile-message
Check if a value is a VFileMessage object
const VFile = require('vfile');
const isVFileMessage = require('is-vfile-message');
const file = new VFile();
isVFileMessage(file.warn('error!')); //=> true
Installation
Package managers
npm
npm install is-vfile-message
bower
bower install is-vfile-message
Standalone
Download the script file directly.
API
isVFileMessage(value)
value: any value
Return: Boolean
It returns true
if the argument is a valid VFileMessage object, otherwise false
.
isVFileMessage(new Error()); //=> false
isVFileMessage({name: 'error!'}); //=> false
isVFileMessage(); //=> false
License
Copyright (c) 2015 Shinnosuke Watanabe
Licensed under the MIT License.