0

Javascript library of ColdFusion functions

Javascript

I often find myself working in Javascript and thinking "Man I wish there was a JS equivalent of the CFML xyz() method!" Tonight was one of those nights as I was about to make my own ListAppend() method. Instead, I came across a Javascript library that is collection of ColdFusion functions ported into Javascript, written by a guy named Randy Anderson. If you are ever looking for any of the functions listed below, go check out Randy's Javscript Library of ColdFusion Functions.

Here is the list of functions included in the library:

Abs(number)
ArrayAppend(array, value)
ArrayLen(array)
ArraySort(array, sort_type [, sort_order ])
ArrayToList(array [, delimiter ])
Ceiling(number)
Compare(string1, string2)
CompareNoCase(string1, string2)
DateDiff(datepart, date1, date2)
DecimalFormat(number)
DollarFormat(number)
Find(substring, string)
FindNoCase(substring, string)
Insert(substring, string, position)
IsDate(date)
IsNumeric(string)
LCase(string)
Left(string, count)
Len(sting)
ListAppend(list, value, [, delimiters])
ListDeleteAt(list, position [, delimiters ])
ListFind(list, value [, delimiters ]))
ListFindNoCase(list, value [, delimiters ]))
ListGetAt(list, position [, delimiters ]))
ListLen(list [, delimiters])
ListToArray(list [, delimiters])
LTrim(string)
Mid(string, start, count)
Replace(string, substring1, substring2 [, scope ])
ReplaceNoCase(string, substring1, substring2 [, scope ])
Reverse(string)
Right(string, count)
Round(number [, number of decimal places])
RTrim(string)
Trim(string)
UCase(string)
URLDecode(string)
URLEncodedFormat(string)
tags:
Javascript
Justin Carter said:
 
Also if you use the jQuery JS library, don't forget CFJS:
http://cfjs.riaforge.org/

:)
 
posted 939 days ago
Add Comment Reply to: this comment OR this thread
 
 
Justin, very cool... I didn't know that existed! I have put off jQuery long enough. I am going to go pull it down right now. Thanks for the nudge.
 
posted 939 days ago
Add Comment Reply to: this comment OR this thread
 
Rey Bango said:
 
Dave, if you need any help while using jQuery, let me know. As a member of the jQuery project team and long time CF developer, I want to ensure that my peers are successful with it.
 
posted 939 days ago
Add Comment Reply to: this comment OR this thread
 
 
Rey, thanks a lot for the offer. I am putting you on speed dial. :)
 
posted 939 days ago
Add Comment Reply to: this comment OR this thread
 
Rey Bango said:
 
Anytime. You can reach me at 954-775-1111 if necessary or on AIM at gotcfm
 
posted 939 days ago
Add Comment Reply to: this comment OR this thread
 
Aaron Longnion said:
 
thanks for sharing, and nice new site design :)
 
posted 939 days ago
Add Comment Reply to: this comment OR this thread
 
 
Well it appears that jQuery might have to wait for another day. The project I was going to apply it to uses Rico and it looks like there are some name space conflicts. Is there an easy workaround for that?
 
posted 939 days ago
Add Comment Reply to: this comment OR this thread
 
gotcfm said:
 
 
posted 939 days ago
Add Comment Reply to: this comment OR this thread
 
Diogo Moura said:
 
UAuuu! Thank You man.....
 
posted 938 days ago
Add Comment Reply to: this comment OR this thread
 
Christopher Jordan said:
 
@Justin:

Thanks for plugging cfjs man! :o)

Also, as I always like to tell people: I started cfjs using Randy Anderson's LeftCorner.js library. I've fixed several bugs and have now added lots of new functions that weren't in LeftCorner.js. Before I turned my updated hacked up copy of LeftCorner.js into the jQuery plugin that it is now, I emailed Randy, and told him what I intended. I also gave him all the bug fixes I had up to that point.

Anyway, credit where credit is due.

Just so folks know CFJS for jQuery is also available at http://jquery.com/plugins.

And for folks who for one reason or another can't (or don't want to) use jQuery, I'll be offering the library of functions as a regular JavaScript object that you can include in any of your JS work.

I hope folks find the library useful! :o)

Chris
 
posted 935 days ago
Add Comment Reply to: this comment OR this thread
 
John Allen said:
 
WOW!
Just WOW!
 
posted 934 days ago
Add Comment Reply to: this comment OR this thread
 

Search