function ucs2encode( arr ) {
	var out;
	var tmp;
	var i;

	out = [];
	for ( i = 0; i < arr.length; i++ ) {
		tmp = arr[ i ];
		if ( tmp > 0xFFFF ) {
			tmp -= 0x10000;
			out.push( String.fromCharCode( ( (tmp >>> 10) & 0x3FF ) | 0xD800 ) ); // eslint-disable-line max-len
			tmp = 0xDC00 | ( tmp & 0x3FF );
		}
		out.push( String.fromCharCode( tmp ) );
	}
	return out.join( '' );
}
Returns the UCS-2 encoding from code points.

@private
@param {NonNegativeIntegerArray} arr - array of code points
@returns {string} - UCS-2 encoded string