/Ezjs

A dangerous Javascript Library that adds simplicity to a complex Javascript.

Primary LanguageJavaScriptMIT LicenseMIT

Ezjs

Version GitHub license Gitter

This is a Javascript Library that adds simplicity to a complex Javascript. It extends the prototypes of the default Javascript objects in order to add more methods and capabilities for more efficient and faster code. Kind of like Underscore.js and Easify, just a little more dangerous.

Installation

To get started using Ezjs, just include ezjs.js or ezjs.min.js into your HTML, like so:

<script src="ezjs.js"></script>

Or for the minified version (improves performance and load time):

<script src="ezjs.min.js"></script>

It is also recommended that you put the Ezjs <script> tags above you closing body tag, </body>.

Documentation

This is the documentation for Ezjs. If you see an alias that means that that method name can also be called by the alias, for example:

"brenden".capitalize(); //==> "Brenden"

Is the same as:

"brenden".cap(); //==> "Brenden"

They both return the same result, .cap() is just easier to remember and is faster.

String Methods

String.capitalize()- Capitalizes the first letter of a string.

Alias: .cap() .titlecase()

Examples:

"brenden".capitalize(); //==> "Brenden"
"brenden".cap(); //==> "Brenden"
"bRENDEN".titlecase(); //==> "BENDEN"

String.downcase()- Returns the string in all lowercase letters.

Alias: .down() .lower()

Examples:

"Brenden".downcase(); //==> "brenden"
"BRENDEN".lower(); //==> "brenden"
"BrEnDeN".down(); //==> "brenden"

Array Methods

Array.bridge(arr)- Returns a new Array with the combined values from the original array and arr.

Examples:

['Curly','Moe','Larry'].bridge(['Shemp','Joe']); 
//==>  ['Curly', 'Moe', 'Larry', 'Shemp', 'Joe']

--

Array.has(val)- Returns a boolean of whether or not the array has val.

Examples:

['Curly', 'Moe', 'Larry'].has('Moe'); //==> True
[1, 2, 3].has(1); //==> True
 
['Curly', 'Moe', 'Larry'].has('Shemp'); //==> False
[1, 2, 3].has(4); //==> False

Boolean Methods

Object Methods

Function Methods