Skip to content

A TypeScript anagram string comparison project for the Web and Node CLI with basic Mocha tests. Deployed September 2023

License

Notifications You must be signed in to change notification settings

airbr/anagram-string

Repository files navigation

Anagram String project - Morgan Murrah

This is a small TypeScript repository for the web and node CLI to compare strings and determine if they are anagrams. There are also some basic Mocha tests in TS.

The sources and planning that went into this project are documented in SOURCES.MD.

Node

ts-node ./src/main.ts [string1] [string2] 

Example:

 ts-node ./src/main.ts "this is a really long anagram" "this really long is a anagram"
 The result is: ANAGRAM!

Run Mocha Tests:

   npm test

  Using the is Anagram function from src/variations
    ✔ Correctly determines an Anagram of hello
    ✔ Correctly determines an Anagram of testing
    ✔ Correctly determines an Anagram of trc aina
    ✔ Correctly determines an Anagram of number123
    ✔ Correctly determines an Anagram of along the riverways
    ✔ Correctly fails comparing two different strings

  6 passing (5ms)

Setup

npm install

This project uses Parcel, which automatically transpiles the .ts files into JS.

The tsc command can be run to verify the integrity of the types, which are minimal in this small project.

run the server

npm run serve

Browse to localhost:1234

Build for production

When you're ready to deploy, you can build for production with the following command:

npm run build

About

A TypeScript anagram string comparison project for the Web and Node CLI with basic Mocha tests. Deployed September 2023

Topics

Resources

License

Stars

Watchers

Forks