Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cool-text-package

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cool-text-package

these are amazing utilities that everyone should use.

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

check it out on npm!

Features

  1. String.prototype.upperFirst( ) A function that uppercases the first character of string.
    • Example Input: i want this capitalized.
    • Expected Output: I want this capitalized.
  2. String.prototype.lowerFirst( ) A function that lowercases the first character of string.
    • Example Input: I like lowercase
    • Expected Output: i like lowercase
  3. String.prototype.upperWord( ) A function that uppercases the first letter of each word in a string.
    • Example Input: I like caps.
    • Expected Output: I Like Caps.
  4. String.prototype.upperWiggle( ) A function that uppercases every other letter.
    • Example Input: I feel All wiggly.
    • Expected Output: I FeEl aLl wIgGlY.
  5. String.prototype.removeSpaces( ) A function that removes all whitespace from a given string.
    • Example Input: try to decode this!
    • Expected Output: trytodecodethis!
  6. String.prototype.trimSpaces( ) A function that removes only the extra whitespace from a given string (example: “ a b ” → “a b”).
    • Example Input: far out
    • Expected Output: far out
  7. String.prototype.allCaps( ) A function that makes all characters uppercase. (this is the same as .toUppercase()).
    • Example Input: i like to yell!!
    • Expected Output: I LIKE TO YELL!!
  8. String.prototype.kababCase( ) A function that removes extra spaces and replaces spaces with the hyphen "-", and makes all characters lowercase.
    • Example Input: What is kabab-case anyway
    • Expected Output: what-is-kabab-case-anyway
  9. String.prototype.snakeCase( ) Removes extra space and replaces spaces with an underscore "_", and makes all characters lowercase.
    • Example Input: Snakes are Amazing
    • Expected Output: snakes_are_amazing
  10. String.prototype.camelCase( ) Lowercases the first character of the first word. Then uppercases the first character of all other words, and removes all spaces.
    • Example Input: CAMELS are a special sort of animal.
    • Expected Output: camelsAreASpecialSortOfAnimal

See Homework 1

Usage

Just connect any of those functions to a string and see magic! Note, none of these functions take in a parameter. They are methods.

Example:

let superString = 'wow! this project is    soooooooooooo   cool. Just amazing.    '
console.log(superString.snakeCase())

Keywords

FAQs

Package last updated on 16 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc