1.0.0 • Published 8 years ago

is-vfile-message v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

is-vfile-message

NPM version Bower version Build Status Coverage Status devDependency Status

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.