Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

normalizeKey.js 270B

123456789
  1. export default function normalizeKey(key) {
  2. // Cast the key to a string, as that's all we can set as a key.
  3. if (typeof key !== 'string') {
  4. console.warn(`${key} used as a key, but it is not a string.`);
  5. key = String(key);
  6. }
  7. return key;
  8. }