This file contains hidden or 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
describe("Open", () => { | |
/** Resumo dos seletores | |
* *= Contém a string em qualquer parte d o valor | |
* $= O valor termina com a string especificada | |
* ^= O valor começa com a string especificada | |
* |= O valor é exatamente igual á string ou começa com ela seguida de um hífen. | |
* ~= O valor contém a string como uma palavra separada por espaços | |
*/ | |
it("Dicas input por name", () => { | |
// <input type="email" id="username" name="username-login" required="" placeholder="informe-seu-email" autocomplete="off" value="" /> |
This file contains hidden or 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 { factory } from '@mswjs/data'; | |
import { http, HttpResponse } from 'msw'; | |
import { faker } from '@faker-js/faker'; | |
import { primaryKey } from '@mswjs/data'; | |
type User = { | |
id: string; | |
firstName: string; | |
}; |
This file contains hidden or 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 CryptoJS from 'crypto-js'; | |
export const encryptData = <T = unknown>(secretPass: string, data: T) => { | |
const encryptedData = CryptoJS.AES.encrypt( | |
JSON.stringify(data), | |
secretPass, | |
).toString(); | |
return encryptedData; | |
}; |
This file contains hidden or 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
/** | |
* Encryption methods and encryption removal | |
*/ | |
# const encryptData = <T = unknown>(secretPass: string, data: T) => ... | |
# const decryptData = <T = unknown>(secretPass: string, encryptedData: string): T => ... | |
/** | |
* Secret key to use for encryption and decryption | |
*/ | |
# const SECRET_PASS_LOCAL_STORAGE = '...' |
This file contains hidden or 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
type PrintHtmlParams = { | |
/** | |
* `containerId`: | |
* - Index of the element where the content to be printed will be assembled | |
*/ | |
containerId: string; | |
/** | |
* `elementHtml`: | |
* - Content to be printed | |
*/ |
This file contains hidden or 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
'use strict' | |
const axios = require('axios'); | |
require('dotenv').config(); | |
const getData = async () => { | |
const result = await axios.get('https://next.json-generator.com/api/json/get/4JJYrbRxu'); | |
return result.data.map(person => ({ | |
age: person.age, |
This file contains hidden or 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
{ | |
"workbench.iconTheme": "material-icon-theme", | |
"workbench.colorTheme": "Hack The Box-Lite", | |
"launch": { | |
"configurations": [], | |
"compounds": [] | |
}, | |
"editor.fontFamily": "Fira Code", | |
"editor.fontSize": 14, | |
"editor.lineHeight": 20, |