{"size": 1213, "ext": "js", "max_stars_repo_path": "js/mui.detect.js", "max_stars_repo_name": "xiaojinlover/shangtongbao", "max_stars_repo_stars_event_min_datetime": "2015-01-01T02:10:13.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T02:54:19.000Z", "max_issues_repo_path": "js/mui.detect.js", "max_issues_repo_name": "gudanya123/mui", "max_issues_repo_issues_event_min_datetime": "2015-01-08T03:05:36.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T06:27:42.000Z", "max_forks_repo_path": "js/mui.detect.js", "max_forks_repo_name": "gudanya123/mui", "max_forks_repo_forks_event_min_datetime": "2015-01-03T01:33:19.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-28T04:13:58.000Z"}
{"max_stars_count": 15458, "max_issues_count": 431, "max_forks_count": 8380, "avg_line_length": 24.26, "max_line_length": 78, "alphanum_fraction": 0.5210222589}
/**
 * $.os
 * @param {type} $
 * @returns {undefined}
 */
(function($, window) {
	function detect(ua) {
		this.os = {};
		var funcs = [

			function() { //wechat
				var wechat = ua.match(/(MicroMessenger)\/([\d\.]+)/i);
				if (wechat) { //wechat
					this.os.wechat = {
						version: wechat[2].replace(/_/g, '.')
					};
				}
				return false;
			},
			function() { //android
				var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/);
				if (android) {
					this.os.android = true;
					this.os.version = android[2];

					this.os.isBadAndroid = !(/Chrome\/\d/.test(window.navigator.appVersion));
				}
				return this.os.android === true;
			},
			function() { //ios
				var iphone = ua.match(/(iPhone\sOS)\s([\d_]+)/);
				if (iphone) { //iphone
					this.os.ios = this.os.iphone = true;
					this.os.version = iphone[2].replace(/_/g, '.');
				} else {
					var ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
					if (ipad) { //ipad
						this.os.ios = this.os.ipad = true;
						this.os.version = ipad[2].replace(/_/g, '.');
					}
				}
				return this.os.ios === true;
			}
		];
		[].every.call(funcs, function(func) {
			return !func.call($);
		});
	}
	detect.call($, navigator.userAgent);
})(mui, window);