const { parse, stringify } = window.JSON;

export default {
  coerce (val) {
    return Array.isArray(val) ? val : [val];
  },
  default () {
    return [];
  },
  deserialize (val) {
    return parse(val);
  },
  serialize (val) {
    return stringify(val);
  }
};

export default {
  coerce: val => Array.isArray(val) ? val : [val],
  default: () => [],
  deserialize: JSON.parse,
  serialize: JSON.stringify
};

Make code a bit more concise.
Make code a bit more concise.
