My preference would be to do 

```
value = _.isArray(value) ? value : [value];
.each(value, function(checkboxValue) {
  $('[name="' + name + '"][value="' + checkboxValue + '"]').prop('checked', true).trigger('change');
});
```

so we don't repeat the logic