Sha256: 676b31afe6c32058bd9790c6b45d9a0da71aeeb9eea059eaa7f16e30f19d5b28
Contents?: true
Size: 1.17 KB
Versions: 375
Compression:
Stored size: 1.17 KB
Contents
/* global color */ /** * API for handling incomplete color data * @namespace axe.commons.color.incompleteData * @inner */ color.incompleteData = (function() { var data = {}; return { /** * Store incomplete data by key with a string value * @method set * @memberof axe.commons.color.incompleteData * @instance * @param {String} key Identifier for missing data point (fgColor, bgColor, etc.) * @param {String} reason Missing data reason to match message template */ set: function(key, reason) { if (typeof key !== 'string') { throw new Error('Incomplete data: key must be a string'); } if (reason) { data[key] = reason; } return data[key]; }, /** * Get incomplete data by key * @method get * @memberof axe.commons.color.incompleteData * @instance * @param {String} key Identifier for missing data point (fgColor, bgColor, etc.) * @return {String} String for reason we couldn't tell */ get: function(key) { return data[key]; }, /** * Clear incomplete data on demand * @method clear * @memberof axe.commons.color.incompleteData * @instance */ clear: function() { data = {}; } }; })();
Version data entries
375 entries across 375 versions & 1 rubygems