mirror of
				https://github.com/imezx/Warp.git
				synced 2025-11-04 03:49:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			8 lines
		
	
	
		
			No EOL
		
	
	
		
			212 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			8 lines
		
	
	
		
			No EOL
		
	
	
		
			212 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
export function getItemsCount(state) {
 | 
						|
  if (state.collections.length === 0) {
 | 
						|
    return 0;
 | 
						|
  }
 | 
						|
  return state.collections.reduce(function (sum, collection) {
 | 
						|
    return sum + collection.items.length;
 | 
						|
  }, 0);
 | 
						|
} |