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
export { | |
deferred, | |
Deferred, | |
delay, | |
} from "https://deno.land/std@0.51.0/async/mod.ts"; | |
export { decode, encode } from "https://deno.land/std@0.51.0/encoding/utf8.ts"; | |
export { | |
assertEquals, | |
assertThrowsAsync, | |
} from "https://deno.land/std@0.51.0/testing/asserts.ts"; |
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
export { | |
getStr, | |
setStr, | |
setArr, | |
} from "https://deno.land/x/sqlite/src/wasm.ts"; | |
export { Status, Values } from "https://deno.land/x/sqlite/src/constants.ts"; | |
export { | |
Rows, |
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 { | |
getStr, | |
setStr, | |
setArr, | |
Status, | |
Values, | |
Rows, | |
Empty, | |
log, | |
} from "./sqlite_deps.ts"; |
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
export { | |
Pool, | |
PostgresError | |
} from "https://deno.land/x/postgres/mod.ts"; | |
export { | |
Connection | |
} from "https://deno.land/x/postgres/connection.ts"; | |
export { |
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 { | |
Connection, ConnectionOptions, createParams, | |
QueryPostgres, QueryConfig, QueryResult, PostgresError, log | |
} from "./postgres_deps.ts"; | |
/** Transaction processor */ | |
export interface TransactionProcessor<T> { | |
(connection: Connection): Promise<T>; | |
} |
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
let graphAdj; | |
let visited; | |
let stack; | |
const initGraph = (maxVertice) => { | |
visited = new Array(maxVertice); | |
stack = [] |
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
// Online Javascript Editor for free | |
// Write, Edit and Run your Javascript code using JS Online Compiler | |
let graphAdj; | |
var visited; | |
let queue; | |
const initGraph = (maxVertice) => { |
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 readline = require("readline"); | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); | |
let player = 'X'; | |
let ticktacktoe = [ |
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
router.post( | |
'/customers', | |
check('email').isEmail(), | |
CustomerController.create | |
); | |
router.post( | |
'/customers/login', | |
passport.authenticate('login'), |
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
static async create(req, res, next) { | |
try { | |
const errors = validationResult(req); // Finds the validation errors in this request and wraps them in an object with handy functions | |
if (!errors.isEmpty()) { | |
return res.status(422).json({ | |
error: { | |
code: `USR_03`, | |
message: `The email is invalid.`, // eslint-disable-line | |
field: `email`, |
NewerOlder