├── .gitignore ├── README.md ├── module1.mjs ├── module2.mjs ├── package-lock.json ├── package.json ├── public ├── android-icon-144x144.png ├── android-icon-192x192.png ├── android-icon-36x36.png ├── android-icon-48x48.png ├── android-icon-72x72.png ├── android-icon-96x96.png ├── apple-icon-114x114.png ├── apple-icon-120x120.png ├── apple-icon-144x144.png ├── apple-icon-152x152.png ├── apple-icon-180x180.png ├── apple-icon-57x57.png ├── apple-icon-60x60.png ├── apple-icon-72x72.png ├── apple-icon-76x76.png ├── apple-icon-precomposed.png ├── apple-icon.png ├── browserconfig.xml ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon-96x96.png ├── favicon.ico ├── index.html ├── manifest.json ├── ms-icon-144x144.png ├── ms-icon-150x150.png ├── ms-icon-310x310.png ├── ms-icon-70x70.png └── robots.txt └── src ├── App.css ├── App.js ├── App.test.js ├── components ├── About.js ├── Alert.js ├── Navbar.js └── TextForm.js ├── index.css ├── index.js ├── logo.svg ├── reportWebVitals.js └── setupTests.js /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 13 | 14 | The page will reload if you make edits.\ 15 | You will also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 35 | 36 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 39 | 40 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /module1.mjs: -------------------------------------------------------------------------------- 1 | import dza, {a, c, d} from './module2.mjs' 2 | console.log(dza); 3 | console.log(c); 4 | console.log(d); 5 | console.log(a); -------------------------------------------------------------------------------- /module2.mjs: -------------------------------------------------------------------------------- 1 | const a = "Harry"; 2 | const b = "Rohan"; 3 | const c = "Aakash"; 4 | const d = "Priyanka"; 5 | 6 | export default b; 7 | export {a}; 8 | export {c}; 9 | export {d}; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "textutils", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.14.1", 7 | "@testing-library/react": "^11.2.7", 8 | "@testing-library/user-event": "^12.8.3", 9 | "react": "^17.0.2", 10 | "react-dom": "^17.0.2", 11 | "react-router-dom": "^5.2.0", 12 | "react-scripts": "4.0.3", 13 | "web-vitals": "^1.1.2" 14 | }, 15 | "scripts": { 16 | "predeploy": "npm run build", 17 | "deploy": "gh-pages -d build", 18 | "start": "react-scripts start", 19 | "build": "react-scripts build", 20 | "test": "react-scripts test", 21 | "eject": "react-scripts eject" 22 | }, 23 | "eslintConfig": { 24 | "extends": [ 25 | "react-app", 26 | "react-app/jest" 27 | ] 28 | }, 29 | "browserslist": { 30 | "production": [ 31 | ">0.2%", 32 | "not dead", 33 | "not op_mini all" 34 | ], 35 | "development": [ 36 | "last 1 chrome version", 37 | "last 1 firefox version", 38 | "last 1 safari version" 39 | ] 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /public/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/android-icon-144x144.png -------------------------------------------------------------------------------- /public/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/android-icon-192x192.png -------------------------------------------------------------------------------- /public/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/android-icon-36x36.png -------------------------------------------------------------------------------- /public/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/android-icon-48x48.png -------------------------------------------------------------------------------- /public/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/android-icon-72x72.png -------------------------------------------------------------------------------- /public/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/android-icon-96x96.png -------------------------------------------------------------------------------- /public/apple-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/apple-icon-114x114.png -------------------------------------------------------------------------------- /public/apple-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/apple-icon-120x120.png -------------------------------------------------------------------------------- /public/apple-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/apple-icon-144x144.png -------------------------------------------------------------------------------- /public/apple-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/apple-icon-152x152.png -------------------------------------------------------------------------------- /public/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/apple-icon-180x180.png -------------------------------------------------------------------------------- /public/apple-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/apple-icon-57x57.png -------------------------------------------------------------------------------- /public/apple-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/apple-icon-60x60.png -------------------------------------------------------------------------------- /public/apple-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/apple-icon-72x72.png -------------------------------------------------------------------------------- /public/apple-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/apple-icon-76x76.png -------------------------------------------------------------------------------- /public/apple-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/apple-icon-precomposed.png -------------------------------------------------------------------------------- /public/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/apple-icon.png -------------------------------------------------------------------------------- /public/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | #ffffff -------------------------------------------------------------------------------- /public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/favicon-16x16.png -------------------------------------------------------------------------------- /public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/favicon-32x32.png -------------------------------------------------------------------------------- /public/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/favicon-96x96.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | TextUtils - Word counter | character counter | lowercase to uppercase | uppercase to lowercase 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "App", 3 | "icons": [ 4 | { 5 | "src": "\/android-icon-36x36.png", 6 | "sizes": "36x36", 7 | "type": "image\/png", 8 | "density": "0.75" 9 | }, 10 | { 11 | "src": "\/android-icon-48x48.png", 12 | "sizes": "48x48", 13 | "type": "image\/png", 14 | "density": "1.0" 15 | }, 16 | { 17 | "src": "\/android-icon-72x72.png", 18 | "sizes": "72x72", 19 | "type": "image\/png", 20 | "density": "1.5" 21 | }, 22 | { 23 | "src": "\/android-icon-96x96.png", 24 | "sizes": "96x96", 25 | "type": "image\/png", 26 | "density": "2.0" 27 | }, 28 | { 29 | "src": "\/android-icon-144x144.png", 30 | "sizes": "144x144", 31 | "type": "image\/png", 32 | "density": "3.0" 33 | }, 34 | { 35 | "src": "\/android-icon-192x192.png", 36 | "sizes": "192x192", 37 | "type": "image\/png", 38 | "density": "4.0" 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /public/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/ms-icon-144x144.png -------------------------------------------------------------------------------- /public/ms-icon-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/ms-icon-150x150.png -------------------------------------------------------------------------------- /public/ms-icon-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/ms-icon-310x310.png -------------------------------------------------------------------------------- /public/ms-icon-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeWithHarry/TextUtils-React/d58edf52e7bf9dad5db5d998772a48f25c7001c8/public/ms-icon-70x70.png -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | 40 | .blank{ 41 | color: rgb(32, 8, 246); 42 | } -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import './App.css'; 2 | import Navbar from './components/Navbar'; 3 | import TextForm from './components/TextForm'; 4 | import About from './components/About'; 5 | import React, { useState } from 'react'; 6 | import Alert from './components/Alert'; 7 | import { 8 | BrowserRouter as Router, 9 | Switch, 10 | Route 11 | } from "react-router-dom"; 12 | 13 | 14 | function App() { 15 | const [mode, setMode] = useState('light'); // Whether dark mode is enabled or not 16 | const [alert, setAlert] = useState(null); 17 | 18 | const showAlert = (message, type)=>{ 19 | setAlert({ 20 | msg: message, 21 | type: type 22 | }) 23 | setTimeout(() => { 24 | setAlert(null); 25 | }, 1500); 26 | } 27 | 28 | const toggleMode = ()=>{ 29 | if(mode === 'light'){ 30 | setMode('dark'); 31 | document.body.style.backgroundColor = '#042743'; 32 | showAlert("Dark mode has been enabled", "success"); 33 | } 34 | else{ 35 | setMode('light'); 36 | document.body.style.backgroundColor = 'white'; 37 | showAlert("Light mode has been enabled", "success"); 38 | } 39 | } 40 | return ( 41 | <> 42 | 43 | 44 | 45 |
46 | 47 | {/* /users --> Component 1 48 | /users/home --> Component 2 */} 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |
57 |
58 | 59 | ); 60 | } 61 | 62 | export default App; -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /src/components/About.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default function About(props) { 4 | 5 | // const [myStyle, setMyStyle] = useState({ 6 | // color: 'black', 7 | // backgroundColor: 'white' 8 | // }) 9 | let myStyle = { 10 | color: props.mode ==='dark'?'white':'#042743', 11 | backgroundColor: props.mode ==='dark'?'rgb(36 74 104)':'white', 12 | } 13 | 14 | return ( 15 |
16 |

About Us

17 |
18 |
19 |

20 | 23 |

24 |
25 |
26 | Textutils gives you a way to analyze your text quickly and efficiently. Be it word count, character count or 27 | 28 |
29 |
30 |
31 |
32 |

33 | 36 |

37 |
38 |
39 | TextUtils is a free character counter tool that provides instant character count & word count statistics for a given text. TextUtils reports the number of words and characters. Thus it is suitable for writing text with word/ character limit. 40 |
41 |
42 |
43 |
44 |

45 | 48 |

49 |
50 |
51 | This word counter software works in any web browsers such as Chrome, Firefox, Internet Explorer, Safari, Opera. It suits to count characters in facebook, blog, books, excel document, pdf document, essays, etc. 52 | 53 |
54 |
55 |
56 |
57 | 58 |
59 | ) 60 | } 61 | -------------------------------------------------------------------------------- /src/components/Alert.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Alert(props) { 4 | const capitalize = (word)=>{ 5 | const lower = word.toLowerCase(); 6 | return lower.charAt(0).toUpperCase() + lower.slice(1); 7 | } 8 | return ( 9 |
10 | {props.alert &&
11 | {capitalize(props.alert.type)}: {props.alert.msg} 12 |
} 13 |
14 | ) 15 | } 16 | 17 | export default Alert 18 | -------------------------------------------------------------------------------- /src/components/Navbar.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import PropTypes from 'prop-types' 3 | import { Link } from 'react-router-dom'; 4 | 5 | export default function Navbar(props) { 6 | return ( 7 | 29 | ) 30 | } 31 | 32 | Navbar.propTypes = { 33 | title: PropTypes.string.isRequired, 34 | aboutText: PropTypes.string.isRequired 35 | } 36 | 37 | Navbar.defaultProps = { 38 | title: 'Set title here', 39 | aboutText: 'About' 40 | }; -------------------------------------------------------------------------------- /src/components/TextForm.js: -------------------------------------------------------------------------------- 1 | import React, {useState} from 'react' 2 | 3 | 4 | export default function TextForm(props) { 5 | const handleUpClick = ()=>{ 6 | let newText = text.toUpperCase(); 7 | setText(newText) 8 | props.showAlert("Converted to uppercase!", "success"); 9 | } 10 | 11 | const handleLoClick = ()=>{ 12 | let newText = text.toLowerCase(); 13 | setText(newText) 14 | props.showAlert("Converted to lowercase!", "success"); 15 | } 16 | 17 | const handleClearClick = ()=>{ 18 | let newText = ''; 19 | setText(newText); 20 | props.showAlert("Text Cleared!", "success"); 21 | } 22 | 23 | const handleOnChange = (event)=>{ 24 | setText(event.target.value) 25 | } 26 | 27 | // Credits: A 28 | const handleCopy = () => { 29 | navigator.clipboard.writeText(text); 30 | props.showAlert("Copied to Clipboard!", "success"); 31 | } 32 | 33 | // Credits: Coding Wala 34 | const handleExtraSpaces = () => { 35 | let newText = text.split(/[ ]+/); 36 | setText(newText.join(" ")); 37 | props.showAlert("Extra spaces removed!", "success"); 38 | } 39 | 40 | const [text, setText] = useState(''); 41 | // text = "new text"; // Wrong way to change the state 42 | // setText("new text"); // Correct way to change the state 43 | return ( 44 | <> 45 |
46 |

{props.heading}

47 |
48 | 49 |
50 | 51 | 52 | 53 | 54 | 55 |
56 |
57 |

Your text summary

58 |

{text.split(/\s+/).filter((element)=>{return element.length!==0}).length} words and {text.length} characters

59 |

{0.008 * text.split(/\s+/).filter((element)=>{return element.length!==0}).length} Minutes read

60 |

Preview

61 |

{text.length>0?text:"Nothing to preview!"}

62 |
63 | 64 | ) 65 | } 66 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | .accordion-button::after { 2 | filter: invert(1); 3 | } -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | --------------------------------------------------------------------------------