Skip to main content

Secret Secrets

A Learning TypeScript > Functions 🥗 appetizer project.

"Secret secrets are no fun. Secret secrets hurt someone." A wise nurse once told me that. And yet, in my business as the best top-secret agent in the business, secret secrets are sine qua nons.

We believe our rival -the dastardly Goldberger- has been spying on our messages. Your mission, should you choose to accept it, is to aide me in creating TypeScript functions for text encoding and secret management. Are you up to the task, recruit?

Setup

If you haven't yet, set up the github.com/LearningTypeScript/projects repository locally.

git clone https://github.com/LearningTypeScript/projects learning-typescript-projects
cd learning-typescript-projects
npm i

Change your terminal directory to this project's:

cd projects/functions/secret-secrets

In one terminal, start the TypeScript compiler in watch mode:

tsc --watch

In another terminal, run Jest on whichever step you're working on. For example, to run tests for the first step in watch mode:

npm test -- 1 --watch

Steps

Notes

  • Please solve these with for loops, not fancy .map/.reduce shenanigans or with npm libraries.
    • For bonus points, you can try making versions of all the steps that only use array methods instead of for loops!
  • Don't import code from one step into another.