Guest User

Untitled

a guest
Jun 20th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. class CustomInput {
  2. //constructor with default values
  3. constructor({value = '', maxlength = 200, type = 'text', label = ''} = {}) {
  4. this._value = value;
  5. this.maxlength = maxlength;
  6. this.type = type;
  7. this.label = label;
  8. }
  9.  
  10. get value() {
  11. return this._value;
  12. }
  13.  
  14. set value(val) {
  15. this._value = ('' + val).toUpperCase().trim();
  16. }
  17. }
Add Comment
Please, Sign In to add comment