From f63195c4534acae2202c2e9890427863ab5db92e Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Tue, 5 Jun 2018 21:17:53 +1000 Subject: [PATCH] Add some Language Tools --- public/language/Language.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/public/language/Language.jsx b/public/language/Language.jsx index 35b003f..825e47e 100644 --- a/public/language/Language.jsx +++ b/public/language/Language.jsx @@ -74,3 +74,13 @@ class Language { const lang = new Language(); export default lang; + +const LanguageTools = { + random: function(someArray) { + return someArray[Math.floor(Math.random() * someArray.length)]; + } +} + +export { + LanguageTools +}