kgames

KGames — free keyboard games for kids
git clone https://www.keyboard.games/code/kgames.git
Log | Files | Refs | README | LICENSE

lib.js (581B)


      1 (function (root) {
      2   'use strict';
      3 
      4   const AnimalLib = (typeof AnimalLetterLib !== 'undefined')
      5     ? AnimalLetterLib
      6     : require('../animal-letter/lib');
      7 
      8   function getWordLetters(animal) {
      9     return animal.name.toUpperCase().split('');
     10   }
     11 
     12   const api = {
     13     ANIMALS:        AnimalLib.ANIMALS,
     14     shuffleAnimals: AnimalLib.shuffleAnimals,
     15     pickAnimal:     AnimalLib.pickAnimal,
     16     getWordLetters,
     17   };
     18   if (typeof module !== 'undefined' && module.exports) module.exports = api;
     19   root.AnimalSpellLib = api;
     20 }(typeof globalThis !== 'undefined' ? globalThis : this));