code: function getKeys(key) {
      var keys;
      key = key.replace(/\s/g, '');
      keys = key.split(',');
      if ((keys[keys.length - 1]) == '') {
        keys[keys.length - 2] += ',';
      }
      return keys;
    }
docs: abstract key logic for assign and unassign