is-button
Check if an element is a button (
<button>
orinput[type="button"]
)
Supported in IE8+.
Install
$ npm install --save is-button
Usage
var isButton = ; ; // <button id="el">Button</button>//=> true ; // <input type="button" id="el">//=> true ; // <strong id="el">Not a button</strong>//=> false ; // <input type="submit" id="el">//=> false
License
MIT © Arthur Verschaeve