function jsxEscape(value) {
	if (
		value == null ||
		typeof value === 'boolean' ||
		typeof value === 'function'
	) {
		return null;
	}

	if (typeof value === 'object') {
		// Check for VNode
		if (value.constructor === undefined) return value;

		if (isArray(value)) {
			for (let i = 0; i < value.length; i++) {
				value[i] = jsxEscape(value[i]);
			}
			return value;
		}
	}

	return encodeEntities('' + value);
}
Escape a dynamic child passed to `jsxTemplate`. This function
is not expected to be used directly, but rather through a
precompile JSX transform
@param {*} value
@returns {string | null | import('preact').VNode | Array<string | null | import('preact').VNode>}