Hello this is my collection of web development knowledge that I have accumulated. It contains console tips and tricks, reusable styled components, documentation, and much more.
- Website: https://codenameyau.github.io/web-journal
- Web Resources: https://github.com/codenameyau/web-journal/blob/master/docs/web-resources.md
- Styled Components: https://github.com/codenameyau/web-journal/blob/master/docs/styled-components.md
- Webpack: https://github.com/codenameyau/web-journal/blob/master/docs/webpack.md
# Install dependencies.
yarn install
# Starts the storybook app.
yarn storybook
# Deploys updates on master to gh-pages.
yarn deploy
// Copy variable.
copy(temp1)
// Copy JSON object.
copy(JSON.stringify(temp1))
getEventListeners(document)
// JSON format.
copy(getEventListeners(document))
Array.from(document.images).map(img => img.src)
// JSON format.
copy(Array.from(document.images).map(img => img.getAttribute('src')).filter(img => !!img))
// List format.
copy(Array.from(document.images).reduce((acc, img) => acc + img.src + '\n', ''))
window.frames
Mock a library implementation.
jest.mock("@auth0/auth0-spa-js", () => {
return {
Auth0Client: jest.fn().mockImplementation(() => ({
logout: jest.fn(),
loginWithRedirect: jest.fn(),
getTokenSilently: jest.fn(),
getUser: jest.fn(),
getIdTokenClaims: jest.fn(),
checkSession: jest.fn(),
handleRedirectCallback: jest.fn(),
})),
};
});