You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A utility that grabs the event.target.value (if it exists) and passes it along as the first argument to the provided function, followed by the full event object.
Sample usage:
import{withTargetValue}from'browser-event-utils';constinput=document.querySelector('input');input.addEventListener('change',withTargetValue((value,event)=>{console.log(`The value is ${value}`)}));
The text was updated successfully, but these errors were encountered:
Description
A utility that grabs the
event.target.value
(if it exists) and passes it along as the first argument to the provided function, followed by the fullevent
object.Sample usage:
The text was updated successfully, but these errors were encountered: