@sandersgutierrez/platzom
v2.0.0
Published
Traductor de idioma platzom
Downloads
12
Maintainers
Readme
Platzom
Platzom es un idioma inventado para el Curso de Fundamentos de Javascript de Platzi, el mejor lugar de educación online.
Descripción del Idioma
- Si la palabra termina con "ar", se le quitan esas dos letras
- Si la palabra inica con Z, se le añade "pe" al final
- Si la palabra traducida tiene 10 o más letras, se debe partir en dos por la mitad y unir con un guión medio
- Por último, si la palabra original es un palíndromo, ninguna regla anterior cuenta y devuelve la misma palabra pero intercalando letras mayúsculas y minúsculas.
Instalación
npm install @sandersgutierrez/platzom
Uso
const platzom = require('@sandersgutierrez/platzom')
platzom('Programar')
// output: 'Program'
platzom('Zorro')
// output: 'Zorrope'
platzom('Zarpar')
// output: 'Zarppe'
platzom('Abecedario')
// output: 'abece-dario'
platzom('sometemos')
// output: 'sometemos'