README
hast-util-is-event-handler
Check if a property is an event handler.
Install
This package is ESM only:
Node 12+ is needed to use it and it must be imported
ed instead of required
d.
npm:
npm install hast-util-is-event-handler
This package exports the following identifiers:
isEventHandler
.
There is no default export.
Use
import {isEventHandler} from 'hast-util-is-event-handler'
isEventHandler('oncut') //=> true
isEventHandler('onpushsubscriptionchange') //=> true
isEventHandler('ones') //=> false
isEventHandler('class') //=> false
API
isEventHandler(prop)
Check if prop
is a string
starting with 'on'
and its length
is 5 or
more.
Contribute
See contributing.md
in rehypejs/.github
for ways
to get started.
See support.md
for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.