1.8.0 • Published 5 years ago

sariel_str_functions_lib v1.8.0

Weekly downloads
12
License
ISC
Repository
github
Last release
5 years ago

String Library

Build Status Coveralls github Travis (.com) npm npm bundle size Snyk Vulnerabilities for npm package


A library of basic string functions

Functions

  • String.prototype.capitalize())
    Capitalizes the first character of the string and returns it.
    "this is a string".capitalize() //Output: "This is a string"
  • String.prototype.lower())
    Makes the first character of the string lowercase and returns it.
    "This is a String".lower() //Output: "this is a String"
  • String.prototype.capitalizeSentence())
    Capitalizes each word in the string and returns it
    "this is a string".capitalizeSentence() //Output: "This Is A String"
  • String.prototype.evenCaps())
    Capitalizes every other letter(even) in the string and returns it
    "this is a string".evenCaps() //Output: "ThIs iS A StRiNg"
  • String.prototype.oddCaps())
    Capitalizes every other letter(odd) in the string and returns it
    "this is a string".oddCaps() //Output: "tHiS Is a sTrInG"
  • String.prototype.removeWhitespace())
    Removes all spaces from a string and returns it
    "this is a string".removeWhitespace() //Output: "thisisastring"
  • String.prototype.removeExtraWhitespace())
    Remove whitespace from the ends of the string as well as extra spaces in-between words and returns the string

    "   this  is a    string   ".removeExtraWhitespace() //Output: "this is a string"
  • String.prototype.kebabCase()
    changes string from sentence into kebab case and returns it

    "this is a string".kabobCase() //Output: "this-is-a-string"
  • String.prototype.snakeCase()
    changes string from sentence into snake case and returns it
    "this is a string".snakeCase() //Output: "this_is_a_string"
  • String.prototype.camelCase()
    changes string from sentence into camel case and returns it
    "this is a string".camelCase() //Output: "ThisIsAString"
  • String.prototype.asciiShift(val)
    shifts ascii value of all characters by a specified value
"abcdef123".asciiShift(1) //Output: "bcdefg234"
1.8.0

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago