// 秒转为时分秒
export const formatSeconds = (seconds) => {
	let hour = Math.floor(seconds / 3600) >= 10 ? Math.floor(seconds / 3600) : '0' + Math.floor(seconds / 3600);
	seconds -= 3600 * hour;
	let min = Math.floor(seconds / 60) >= 10 ? Math.floor(seconds / 60) : '0' + Math.floor(seconds / 60);
	seconds = Math.floor(seconds - 60 * min);
	let sec = seconds >= 10 ? seconds : '0' + seconds;
	if(hour != '00') {
		return hour + ':' + min + ':' + sec;
	}
	return min + ':' + sec;
}

// 判断是否为数组
export const isArray = (value) => {
	if(typeof Array.isArray === 'function') {
		return Array.isArray(value)
	}
	return Object.prototype.toString.call(value) === '[object Array]'
}