airbr / anagram-string

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

Home Page:https://anagram-string.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Anagram String project - Morgan Murrah

Source Code

This is a TypeScript focused 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 ./main.ts [string1] [string2] 

Example:

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

Run Mocha Tests:

   npm test

  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

  4 passing (4ms)

Web Build

Setup

npm install

run the server

npm run serve

Browse to localhost:1234

Parcel

This starter uses parcel to bundle your scripts.

You can import other files. Make sure you have the correct path. You can also import libraries installed with NPM.

Build for production

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

npm run build

Ideas for further development

  • Making Whitespace optional for the comparison, adding this as a changeable option to the web interface

About

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

https://anagram-string.netlify.app/

License:MIT License


Languages

Language:TypeScript 58.6%Language:HTML 21.2%Language:CSS 20.1%