function comparator( a, b ) {
	var ta = typeof a;
	var tb = typeof b;

	// Strings are sorted before symbols:
	if ( ta === 'string' && tb === 'symbol' ) {
		return -1;
	}
	if ( ta === 'symbol' && tb === 'string' ) {
		return 1;
	}
	// Convert symbols to strings:
	a = String( a );
	b = String( b );

	// Sort in lexicographic order:
	if ( a < b ) {
		return -1;
	}
	if ( a === b ) {
		return 0;
	}
	return 1;
}
Comparator function for sorting property names and symbols in lexicography order.

## Notes

-   Symbols are sorted **after** names.

@private
@param {(string|symbol)} a - property
@param {(string|symbol)} b - property
@returns {integer} comparison result