Skip to content

String class that extends String.protototype method in javascript

Notifications You must be signed in to change notification settings

abdulsemiu-atanda/checkpoint2-string-class

Repository files navigation

Build Status Coverage Status

String Class

This application extends javacript's String.prototype methods

Testing

To test this application, run npm test

Methods

The following methods have been added to javacript's String.prototype

  • hasVowels: Checks if the argument contains vowels

  • toUpper: Converts the argument to uppercase characters

  • toLower: Converts the argument to lowercase characters

  • ucFirst: Converts the first character of the argument to uppercase

  • isQuestion: Checks if the argument is a question

  • words: Returns the list of words in the specified string as an array

  • wordCount: Counts the number of words in a string

  • toCurrency: Converts the argument to a currency format

  • fromCurrency: Converts the argument in currency format to number

  • inverseCase: Returns the argument passed in with inverted character cases

  • alternatingCase: Returns the argument passed in with alternating character cases

  • getMiddle: Returns the character(s) in the middle of the argument

  • numberWords: Returns the words equivalent of the number passed in.

  • isDigit: Checks if the argument is a single digit

  • doubleCheck: Checks if the string contains double characters

Usage

  • You should have NodeJs installed on your machine
  • Clone this repositry: git clone [email protected]:andela-aatanda/string-class.git
  • Install dependencies with npm install

Contributing

  • Fork this repositry to your account.
  • Clone your repositry: git clone [email protected]:your-username/string-class.git
  • Create your feature branch: git checkout -b new-feature
  • Commit your changes: git commit -m "did something"
  • Push to the remote branch: git push origin new-feature
  • Open a pull request.

About

String class that extends String.protototype method in javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published