Skip to content

Commit

Permalink
Merge pull request #79 from danprince/master
Browse files Browse the repository at this point in the history
Javascript conventions and safer export pattern.
  • Loading branch information
Adam Morse committed Aug 26, 2015
2 parents e5691f2 + 137e36e commit ada423b
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions js/colors.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
var colors = {
aqua: "#7FDBFF",
blue: "#0074D9",
lime: "#01FF70",
navy: "#001F3F",
teal: "#39CCCC",
olive: "#3D9970",
green: "#2ECC40",
red: "#FF4136",
maroon: "#85144B",
orange: "#FF851B",
purple: "#B10DC9",
yellow: "#FFDC00",
fuchsia: "#F012BE",
gray: "#aaa",
white: "#fff",
black: "#111",
silver: "#ddd"
};
(function() {
var colors = {
aqua: '#7fdbff',
blue: '#0074d9',
lime: '#01ff70',
navy: '#001f3f',
teal: '#39cccc',
olive: '#3d9970',
green: '#2ecc40',
red: '#ff4136',
maroon: '#85144b',
orange: '#ff851b',
purple: '#b10dc9',
yellow: '#ffdc00',
fuchsia: '#f012be',
gray: '#aaaaaa',
white: '#ffffff',
black: '#111111',
silver: '#dddddd'
};

if(
typeof module !== "undefined" &&
typeof module.exports !== "undefined"
){
module.exports = colors;
}
if(typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
module.exports = colors;
} else {
window.colors = colors;
}
})();

0 comments on commit ada423b

Please sign in to comment.