This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { v4 as uuidv4 } from 'uuid'; | |
export const users = [ | |
{ | |
id: uuidv4(), | |
name: 'Octavio Flores', | |
email: '[email protected]', | |
password: 'abc123' | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { v4 as uuidv4} from 'uuid'; | |
import { pool } from "../database/db"; | |
interface User { | |
id: string | |
name: string | |
email: string | |
password: string | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"beers": [ | |
{ | |
"tap": 1, | |
"beer": "Dank For Days IPA", | |
"style": "IPA" | |
}, | |
{ | |
"tap": 2, | |
"beer": "Endless Winter Blues Dry Stout", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const months = { | |
"01": "January", | |
"02": "February", | |
"03": "March", | |
"04": "April", | |
"05": "May", | |
"06": "June", | |
"07": "July", | |
"08": "August", | |
"09": "September", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mergeSort(array) { | |
if (array.length > 1) { | |
let mid = Math.floor(array.length / 2); | |
let lhs = mergeSort(array.slice(0, mid)); | |
let rhs = mergeSort(array.slice(mid)); | |
return merge(lhs, rhs); | |
} else { | |
return array; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"quotes": [ | |
{ | |
"quote": "Accept that you're just a product, not a gift", | |
"author": "Konrad" | |
}, | |
{ | |
"quote": "TEAMWORK: A few harmless flakes working together can unleash an avalanche of destruction.", | |
"author": "Justin Sewell" | |
}, |