@jswork/next-event-value
v1.0.2
Published
Get event value from evet.target/detail/value.
Downloads
8
Maintainers
Readme
next-event-value
Get event value from evet.target/detail/value.
installation
npm install -S @jswork/next-event-value
usage
import '@jswork/next-event-value';
const event1 = { target: { value: 111 } };
const event2 = { detail: { value: 222 } };
const event3 = true;
const event4 = { xxx: { yyy: { aaa: 'v4' } } };
nx.eventValue(event1) // 111
nx.eventValue(event2) // 222
nx.eventValue(event3) // true
nx.eventValue(event4, { path: 'xxx.yyy.aaa' }); // 'v4'
license
Code released under the MIT license.