function orderProperties(order, properties) {
	if (!order) {
		return properties;
	}
	return properties.sort((a, b) => {
		const aIndex = order.indexOf(a[0]);
		const bIndex = order.indexOf(b[0]);
		if (aIndex < 0) {
			return 1;
		}
		if (bIndex < 0) {
			return -1;
		}
		return aIndex - bIndex;
	});
}
/**
 * orderProperties sorts properties based on uiSchema ui:order array
 *
 * @param order
 * @param properties
 * @returns {Array}
 */
orderProperties sorts properties based on uiSchema ui:order array
@param order
@param properties
@returns {Array}
orderProperties sorts properties based on uiSchema ui : order array @param order @param properties @returns { Array }
function orderProperties(order, properties) {
	if (!order) {
		return properties;
	}
	return properties.sort((a, b) => {
		const aIndex = order.indexOf(a[0]);
		const bIndex = order.indexOf(b[0]);
		if (aIndex < 0) {
			return 1;
		}
		if (bIndex < 0) {
			return -1;
		}
		return aIndex - bIndex;
	});
}
function orderProperties ( order , properties ) { if ( ! order ) { return properties ; } return properties . sort ( ( a , b ) => { const aIndex = order . indexOf ( a [ 0 ] ) ; const bIndex = order . indexOf ( b [ 0 ] ) ; if ( aIndex < 0 ) { return 1 ; } if ( bIndex < 0 ) { return - 1 ; } return aIndex - bIndex ; } ) ; }
orderProperties sorts properties based on uiSchema ui:order array
 @param order
 @param properties
 @returns {Array}
orderProperties sorts properties based on uiSchema ui : order array @param order @param properties @returns { Array }