coerce the value into an array of key strings
342328
function toKeyPath (path) {
  if (!ktypes.isArray(path)) {
    path = [path]
  }
  return _.map(path, function (key) {
    return ktypes.toString(key)
  })
}
137870
def stringify_values(data):
    
    if not isinstance(data, dict):
        raise ValueError('Data must be dict. %r is passed' % data)

    values_dict = {}
    for key, value in data.items():
        items = []
        if isinstance(value, six.string_types):
            items.append(value)
        elif isinstance(value, Iterable):
            for v in value:
                # Convert to str int values
                if isinstance(v, int):
                    v = str(v)
                try:
                    item = six.u(v)
                except TypeError:
                    item = v
                items.append(item)
            value = ','.join(items)
        values_dict[key] = value
    return values_dict
1155084
function coerceQueryParamsToString(queryParams) {
    for (var key in queryParams) {
      if (typeof queryParams[key] === 'number') {
        queryParams[key] = '' + queryParams[key];
      } else if (isArray(queryParams[key])) {
        for (var i = 0, l = queryParams[key].length; i < l; i++) {
          queryParams[key][i] = '' + queryParams[key][i];
        }
      }
    }
  }
170835
def filter_string(filter = {}, array_join = nil)
      filter.inject('') do |mem, kv|
        key, value = kv
        if value.is_a?(Array)
          if !array_join.nil?
            mem += value.inject('') { |m, v|
              v = "\"#{v}\"" if v.to_s.include?(' ')
              m+= "#{key}:#{v}"
            }
            return mem
          else
            value = value.join(array_join)
          end
        end
        value = "\"#{value}\"" if value.to_s.include?(' ')
        mem += "#{key}:#{value} "
      end
    end
882760
def _actually_populate_keyvals(filename):
        
        assert isinstance(filename, str)
        keyvals = {}
        with open(filename, 'r') as f:
            for line in f:
                line = line.strip("\r\n")
                pieces = line.split(_KeyValuePersister._delimiter)
                if len(pieces) >= 2:
                    key = pieces[0]
                    val = _KeyValuePersister._delimiter.join(pieces[1:])
                    keyvals[key] = val
        return keyvals
805185
def normalize_keys(self, value):
        
        return dict((self.normalize_name(k), v) for k, v in value.items())
1207768
function stringify(key, value) {
  if (value instanceof RegExp) {
    return value.toString();
  }
  if (value instanceof Function) {
    return '[function]';
  }
  return value;
}
248179
def get_keys_from_value(self, value):
        

        return [key for key, data in self.iteritems() if data == value]
501573
private String[] convertListToStringArray(List<?> rawValues, ExtendedAttributeDefinition attrDef, EvaluationContext context,
                                              boolean ignoreWarnings) throws ConfigEvaluatorException {
        @SuppressWarnings({ "unchecked", "rawtypes" })
        Collection<String> collection = (Collection) convertListToVector(rawValues, attrDef, context, ignoreWarnings);
        return collection == null ? null : collection.toArray(new String[collection.size()]);
    }
1231580
def get_as_array(self, key):
        
        value = self.get(key)
        return AnyValueMap.from_value(value)
860125
def _stringifyKeys(d):
    
    return dict((k.encode('ascii'), v)  for (k, v) in d.iteritems())
130080
def coerce_to_list(val):
    
    if val:
        if not isinstance(val, (list, tuple)):
            val = [val]
    else:
        val = []
    return val
1367818
function coerceValue(value) {

    let numValue = coerceNumber(value);

    if (numValue === value) {
        return coerceDate(value);
    }

    return numValue;
}
264910
def coerce(cls, key, value):
        """"""
        self = MutationDict((k,MutationObj.coerce(key, v)) for (k, v) in value.items())
        self._key = key
        return self
206399
def value_to_db(self, value):
        

        assert isinstance(value, str)

        array = value.split("-")
        length = len(array) - 3

        assert length >= 0
        assert array[0] == 'S'

        array = array[1:2] + [length, 0, 0, 0, 0, 0] + array[2:]
        array = [int(i) for i in array]

        return struct.pack('<bbbbbbbb' + 'I' * length, *array)
677624
def make_key(self, value):
        
        if value:
            parts = [self.key_filter.sub('', x)
                     for x in self.key_split.split(value.lower())]
            key = parts[0] + ''.join(map(str.capitalize, parts[1:]))
        else:
            key = ''
        if key in self.seen_keys:
            i = 1
            while '%s%d' % (key, i) in self.seen_keys:
                i += 1
            key = '%s%d' % (key, i)
        self.seen_keys.add(key)
        return key
573444
function all(values, keyName) {
    if(values instanceof Array) {
        var results = {};
        for(var i=0; i<values.length; i++) {
            var obj2 = values[i];
            var res = get(obj2, keyName);
            if(res != undefined) {
                results[res] = 0;
            }
        }
        var results2 = [];
        for(var result in results) {
            results2.push(result);
        }
        return results2;
    }
}