code: function(number, opts) {
  			opts = (( typeof opts) === 'string' ? {
  				animation : opts
  			} : opts) || {};
  			_readyCb = function() {
  				try {
  					if ( typeof (number) === 'number' ? (number > 0) : (number !== '')) {
  						var q = {
  							type : 'badge',
  							options : {
  								n : number
  							}
  						};
  						if ('animation' in opts && animation.types['' + opts.animation]) {
  							q.options.animation = '' + opts.animation;
  						}
  						if ('type' in opts && type['' + opts.type]) {
  							q.options.type = '' + opts.type;
  						}
  						['bgColor', 'textColor'].forEach(function(o) {
  							if ( o in opts) {
  								q.options[o] = hexToRgb(opts[o]);
  							}
  						});
  						['fontStyle', 'fontFamily'].forEach(function(o) {
  							if ( o in opts) {
  								q.options[o] = opts[o];
  							}
  						});
  						_queue.push(q);
  						if (_queue.length > 100) {
  							throw 'Too many badges requests in queue.';
  						}
  						icon.start();
  					} else {
  						icon.reset();
  					}
  				} catch(e) {
  					throw 'Error setting badge. Message: ' + e.message;
  				}
  			};
  			if (_ready) {
  				_readyCb();
  			}
  		}
docs: Set badge