{"size": 756, "ext": "js", "max_stars_repo_path": "lib-es5/warning.js", "max_stars_repo_name": "integromat/imt-proto", "max_stars_repo_stars_event_min_datetime": "2018-05-26T14:04:44.000Z", "max_stars_repo_stars_event_max_datetime": "2018-05-26T14:04:44.000Z", "max_issues_repo_path": "lib-es5/warning.js", "max_issues_repo_name": "integromat/imt-proto", "max_issues_repo_issues_event_min_datetime": "2021-01-06T14:20:09.000Z", "max_issues_repo_issues_event_max_datetime": "2021-01-06T14:20:09.000Z", "max_forks_repo_path": "lib-es5/warning.js", "max_forks_repo_name": "integromat/imt-proto", "max_forks_repo_forks_event_min_datetime": "2022-03-27T20:24:49.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-27T20:24:49.000Z"}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 16.8, "max_line_length": 51, "alphanum_fraction": 0.6005291005}
'use strict'

/**
 * For API docummentation see ES6 version.
 */

global.Warning = function() {
	function Warning(message) {
		this.name = 'Warning';
		this.message = message;

		Error.captureStackTrace(this, this.constructor);
	}
	
	Object.defineProperties(Warning.prototype, {
		toString: {
			configurable: true,
			writable: true,
			value: function() {
				return this.name +': '+ this.message;
			}
		},
		inspect: {
			configurable: true,
			writable: true,
			value: function() {
				return '['+ this.name +': '+ this.message +']';
			}
		},
		toJSON: {
			configurable: true,
			writable: true,
			value: function() {
				return {
					name: this.name,
					message: this.message,
					stack: this.stack
				};
			}
		}
	})

	return Warning;
}();
