emmastrienko / read-a-file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

# Problem Statement - Read A File A data file is a computer file which stores data to be used by a computer application. The data file can also contain input data required by the application. Most of the computer programs work with data files. Write a program to read a text file asynchronously and convert the data in the file to uppercase.​ - In the readFile.js provide implementation for the function read() that takes as parameter the file name to be read. The function must return a Promise object, returning the data present in the file.​ - Provide implementation for the function convertToUpperCase()that takes the data returned by the read() function and converts the data to uppercase. Ensure that this function also returns a Promise object so that Promise chaining can be implemented.​ - Make a call to the read() function and perform Promise chaining. ​ - Handle all error situations appropriately.​ # Instructions 1. Download and unzip the boilerplate code. 2. Run the command `npm install` to install the dependencies. 3. Open the boilerplate code in VSCode to develop the solution. 4. Write the code in the **.js** files present in **src** folder 5. Run the test scripts available under **src/test** by giving `npm run test` command in the terminal to test locally. 6. Refactor the solution to ensure all test cases are passing. 7. Zip the solution code with the name same as assignment name. 8. Upload the zipped solution for submission. # read-a-file

About


Languages

Language:JavaScript 100.0%