hash_key = function(value) {
		if (typeof value === 'undefined' || value === null) return null;
		if (typeof value === 'boolean') return value ? '1' : '0';
		return value + '';
	}
Converts a scalar to its best string representation
for hash keys and HTML attribute values.

Transformations:
  'str'     -> 'str'
  null      -> ''
  undefined -> ''
  true      -> '1'
  false     -> '0'
  0         -> '0'
  1         -> '1'

@param {string} value
@returns {string|null}