2.0.4 • Published 3 years ago

zeba v2.0.4

Weekly downloads
7
License
MIT
Repository
github
Last release
3 years ago

GitHub issues GitHub stars GitHub last commit npm npm Dependency GitHub

Zeba

A very lightweight JavaScript library for taking out extra spaces in a string, can make first letter of a string, first letter of each words in a string or all letters in a string to uppercase.

Install:

npm i zeba

Require:

const zeba = require('zeba');

How to use:

Example:

let input = '    this    is the     input.';

input = zeba(input).fullTrim().capitilize().value();

console.log(input);

  • Use value() to get the value.

Outcome:

This is the input.


API

Methods:
  • capitilize()
    • Example: this is the text -> This is the text.
  • upper()
    • from: this is the text -> This Is The Text.
  • allupper()
    • from: this is the text -> THIS IS THE TEXT.
  • fullTrim()
    • fully trims the string from front, back and in betweens.

      let text = '   this   is   the text.  ';

      text = zeba(text).fullTrim().value();

      console.log(text);

    • outputs: this is the text.