Skip to content

Instantly share code, notes, and snippets.

View emersondemetrio's full-sized avatar

Emerson Demetrio emersondemetrio

View GitHub Profile
@emersondemetrio
emersondemetrio / slack-msg-to-alphabet.ts
Last active September 29, 2022 12:41
Message to Slack alphabet
console.clear()
const transformMap: { [key: string]: string } = {
'á': 'a',
'à': 'a',
'ó': 'o',
'é': 'e',
'ç': 'c',
'ã': 'a',
'¿': '?',
'o': 'o',
@emersondemetrio
emersondemetrio / fill-array.js
Last active April 24, 2024 12:32
Fill array with something
// 2024 version
const arr = Array.from({ length: 30 }, (_, id) => ({
id,
name: `item-${id}`
}));
// 2018 version
const arr = Array.from(Array(30), (_, id) => ({
id,
name: `item-${id}`