Skip to content

401-advanced-javascript-billybunn/lab-04

Repository files navigation

CF LAB

Buffers - File Transformers

Author: Billy Bunn

Links and Resources

Documentation

  • jsdoc (All assignments)

Modules

index.js

Exported Values and Methods
createArticle()

Using only buffers and bit manipulation, reads the file pair-programming.txt from the files folder and makes the following transformations:

  • Wraps all of the content within <article> tags
  • Wrap each section title in an <h2>
  • Converts each sentence in each paragraph into a list item.
  • Converts each of the numbered sections in the bottom of the document to <h3> tags.
makeLoopJS(content)

Generates a file in the files folder called loop.js that initiates an array with 3 people's names, iterates them with a forEach loop, and console.log's each value.

Verify it worked by running node files/loop.js and seeing the array items printed out.

Setup

.env requirements

  • npm i
  • PORT - assign a port number

Running the app

  • node index.js - runs functions to accomplish 2 tasks described in the lab
  • node files/loop.js - prints out three names (only works after running node index.js)

Tests

  • How do you run tests?
    • npm run test
    • npm run lint
  • What assertions were made?
  • What assertions need to be / should be made?

UML

Link to an image of the UML for the application and response to events

About

LAB: Buffers - File Transformers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published