Skip to content

BlackPrincess/javascriptx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavascriptX

An extension to the core javascript libray.

Created On a Whim.

I don't know, but there is probably a better one out there. :)

Browser

Insert the following code into the HTML file you want include JavascriptX in:

<script src="/javascriptx/build/javascriptx.min.js type="text/javascript"></script>

Examples

"0123".toInt()      // 123
"0123".toIntOrZero() // 123
"NaN".toIntOrZero() // 0

"The {0} is {1}".format("cat", "cute")    // The cat is cute
"0123.45".toHalfNumber()     // 123.45 
"qwrty".toHalfAlphabet()     // qwrty

var f = (function(a,b,c,d){
    return a + b + c + d;
}).curried(); // f(1)(2)(3)(4);

(new Date(2013, 0, 1)).dateDiff("month", new Date(2014, 2, 1)); // 12

You can see more in /test

TODO

anything!!

About

An extension to the core javascript library

Resources

License

Stars

Watchers

Forks

Packages

No packages published