How to pass arguments automatically in LiveScript

64 Views Asked by At

How I can simplify line 3 (onChange property):

Input do
  name: \input
  onChange: (event, value) ~> @limitInput { type: \string }, event, value
1

There are 1 best solutions below

0
Aria On BEST ANSWER

You can use a bound partial application, documented here. Example:

Input do
  name: \input
  onChange: @~limitInput({type: \string}, _, _)