models/View.js
function getNextID () {
				var max = 0;
				_.forEach(newPages, function(page){
					if(page.id) max = Math.max(max, page.id*1);
				});
				var next = max*1+1;
				return next;
			}
function getNextID () {
				var max = 0;
				_.forEach(newPages, function(page){
					if(page.id) max = Math.max(max, page.id*1);
				});
				var next = max*1+1;
				return next;
			}
function getNextID ( ) { var max = 0 ; _ . forEach ( newPages , function ( page ) { if ( page . id ) max = Math . max ( max , page . id * 1 ) ; } ) ; var next = max * 1 + 1 ; return next ; }
Helper function that will return next available ID
Helper function that will return next available ID