src/js/responsive-switcher.js
// transorms array of breakpoint numbers into queries describing these breakpoints
transorms array of breakpoint numbers into queries describing these breakpoints
transorms array of breakpoint numbers into queries describing these breakpoints
function makeBreakpointQueries(breakpoints) {
	breakpoints = breakpoints
		.map(num => parseInt(num))
		.filter(num => num) 
	var queries = [makeFirstQuery(breakpoints[0])]
	var lastIndex = breakpoints.length - 1
	if (lastIndex > 0) {
		for (var i = 0; i < lastIndex; i++)
			queries.push(makeStepQuery(breakpoints[i], breakpoints[i + 1]))
	}
	queries.push(makeLastQuery(breakpoints[lastIndex]))
	return queries
}
function makeBreakpointQueries ( breakpoints ) { breakpoints = breakpoints . map ( num => parseInt ( num ) ) . filter ( num => num ) var queries = [ makeFirstQuery ( breakpoints [ 0 ] ) ] var lastIndex = breakpoints . length - 1 if ( lastIndex > 0 ) { for ( var i = 0 ; i < lastIndex ; i ++ ) queries . push ( makeStepQuery ( breakpoints [ i ] , breakpoints [ i + 1 ] ) ) } queries . push ( makeLastQuery ( breakpoints [ lastIndex ] ) ) return queries }
transorms array of breakpoint numbers into queries describing these breakpoints
transorms array of breakpoint numbers into queries describing these breakpoints
//breakpoints = breakpoints.map(Number) // for now just filter out empty breakpoints