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
npm install is-vfile-message
bower install is-vfile-message
Download the script file directly.
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
Copyright (c) 2015 Shinnosuke Watanabe
Licensed under the MIT License.