Giter Site home page Giter Site logo

airbr / anagram-string Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.13 MB

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/

License: MIT License

CSS 20.13% HTML 21.25% TypeScript 58.62%
javascript node web anagram typescript

anagram-string's Introduction

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

anagram-string's People

Contributors

airbr avatar

Stargazers

 avatar

Watchers

 avatar

anagram-string's Issues

Parcel build not working/ Netlify build failing

See the logs. But parcel appears to be failing

$ npm run build 8:50:52 PM: > [email protected] build 8:50:52 PM: > parcel build index.html 8:50:52 PM: sh: 1: parcel: not found 8:50:52 PM: ​ 8:50:52 PM: ──────────────────────────────────────────────────────────────── 8:50:52 PM: "build.command" failed 8:50:52 PM: ──────────────────────────────────────────────────────────────── 8:50:52 PM: ​ 8:50:52 PM: Error message 8:50:52 PM: Command failed with exit code 127: npm run build

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.