function set( bool ) {
	/* eslint-disable no-invalid-this */
	if ( !isBoolean( bool ) ) {
		throw new TypeError( format( 'invalid assignment. `%s` must be a boolean. Value: `%s`.', 'infinities', bool ) );
	}
	if ( bool !== this._infinities ) {
		debug( 'Current value: %s.', this._infinities );

		this._infinities = bool;
		debug( 'New value: %s.', this._infinities );

		this.emit( 'change' );
	}
}
Sets a flag indicating whether to encode infinite values.

@private
@param {boolean} bool - boolean flag
@throws {TypeError} must be a boolean