Git Product home page Git Product logo

pig-latin's Introduction

Pig Latin Translator

Epicodus Practice in JavaScript, HTML, and CSS, August 16, 2017

By Kelsey Langlois, Luciano Oliveira

Description

Site made to practice Behavior Driven Development, JavaScript, and Regular Expressions. Takes a string from the user and translates it to Pig Latin.

Setup/Installation Requirements

You can view this project on GitHub pages at langlk.github.io/pig-latin. To install on your own computer, follow the steps below:

  • Clone this repository
  • Open index.html in web browser of your choice

Specifications

  • The program does nothing for an empty string.

    • Example Input:
    • Example Output:
  • The program does nothing to non-alphabetical characters, since they do not contain consonants or vowels.

    • Example Input: 3
    • Example Output: 3
  • The program adds "way" to single-letter words beginning with a vowel.

    • Example Input: i
    • Example Output: iway
  • The program adds "ay" to single-letter words beginning with a consonant.

    • Example Input: m
    • Example Output: may
  • The program adds "way" to multiple-letter words beginning with a vowel.

    • Example Input: apple
    • Example Output: appleway
  • The program moves the first letter of the word, plus "ay" to the end of multiple-letter words beginning with a consonant.

    • Example Input: Hello
    • Example Output: elloHay
  • The program moves all leading consonants, plus "ay" to the end of a multiple-letter word beginning with more than one consonant.

    • Example Input: Three
    • Example Output: eeThray
  • If q is a leading consonant, program moves the u that follows it as well.

    • Example Input: query
    • Example Output: eryquay
    • Example Input: squirrel
    • Example Output: irrelsquay
  • The program treats "y" as a consonant when a multiple-letter word's first letter is "y".

    • Example Input: yes
    • Example Output: esyay
    • Example Input: Psychology
    • Example Output: ychologyPsay
  • The program moves non-alphabet characters at end of original word to the end of the Pig Latin word.

    • Example Input: Hello!
    • Example Output: elloHay!
  • The program ignores non-alphabet characters inside a word.

    • Example Input: It's
    • Example Output: It'sway
  • The program ignores non-alphabet characters at the front of a word.

    • Example Input: 'Sup
    • Example Output: 'upSay
  • The program does the above for a string with multiple space-separated words.

    • Example Input: This is Pig Latin
    • Example Output: isThay isway igPay atinLay

    Support and contact details

    Please contact Kelsey Langlois at [email protected], or Luciano Oliveira with questions, comments, or issues.

    Technologies Used

    • HTML
    • CSS
    • Bootstrap
    • JavaScript

    License

    Copyright (c) 2017 Kelsey Langlois, Luciano Oliveira

    This software is licensed under the MIT license.

pig-latin's People

Contributors

langlk avatar

Watchers

James Cloos avatar

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.