Logo
Explore Help
Sign In
flynx/colors.js
1
0
Fork 0
You've already forked colors.js
mirror of https://github.com/flynx/colors.js.git synced 2025-10-28 18:40:09 +00:00
Code Issues Packages Projects Releases Wiki Activity
colors.js/lib/maps/random.js

13 lines
378 B
JavaScript
Raw Normal View History

[refactor] [major] Code cleanup. Node has changed a bit since 2010. [api] Added ability to safely require colors without messing with String.prototype [api] Removed browser functionality [dist] Add travis file
2014-09-30 22:41:24 +02:00
var colors = require('../colors');
Add ESLint and lint all files; add lint check to CI
2018-04-30 14:59:34 -07:00
module['exports'] = (function() {
var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green',
'blue', 'white', 'cyan', 'magenta'];
[refactor] [major] Code cleanup. Node has changed a bit since 2010. [api] Added ability to safely require colors without messing with String.prototype [api] Removed browser functionality [dist] Add travis file
2014-09-30 22:41:24 +02:00
return function(letter, i, exploded) {
Add ESLint and lint all files; add lint check to CI
2018-04-30 14:59:34 -07:00
return letter === ' ' ? letter :
colors[
available[Math.round(Math.random() * (available.length - 2))]
](letter);
[refactor] [major] Code cleanup. Node has changed a bit since 2010. [api] Added ability to safely require colors without messing with String.prototype [api] Removed browser functionality [dist] Add travis file
2014-09-30 22:41:24 +02:00
};
Add ESLint and lint all files; add lint check to CI
2018-04-30 14:59:34 -07:00
})();
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 27ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API

Powered by TurnKey Linux.