This documentation is automatically generated. See Documenting Code for more information.
Functions
collectionsAre (names )
Creates top-level storable collections if they do not exist yet.
parameters
array names
randomItem (coll )
Get a random item from a collection.
parameters
coll
examples
randomItem(storage.users)
newest (a, b )
Sort a collection in reverse chronological order, i.e. newest to oldest.
parameters
a
b
examples
storage.users.sort(newest)
oldest (a, b )
Sort a collection in chronological order, i.e. oldest to newest.
parameters
a
b
examples
storage.users.sort(oldest)
Date .when (timestamp )
Get an elapsed time in plain English.
parameters
Date timestamp
returns
string the relative time since that date, e.g. '3 hours'
timeHover (timestamp )
Get an elapsed time in plain English and add a tooltip for the original time.
parameters
object Date timestamp
returns
object an HTML abbr tag
paramGen (object, useCurrent )
Format GET request parameters.
parameters
object object Your parameters in hash table format.
boolean useCurrent If true, starts with the current request parameters and builds on top of them. Defaults to false.
returns
string The parameter string! Just add it to the URL and you're good to go.
extend ()
Extend any number of objects. Useful for cloning. Copied from jQuery.
Number .th (sup, caps )
Adds the english suffix to a number, e.g. 3.th() -> '3rd'
parameters
boolean sup ? If true, returns inside a span tag with the suffix in superscript. If false, returns a plain string.
boolean caps ? If true, converts the suffix to uppercase.
returns
'3rd'
'3rd '
'3RD '
'3RD'
examples
3.th()
3.th(true)
3.th(true, true)
3.th(false, true)
pluralize (, , )
Pluralize a word if necessary
parameters
number
string
string
statusBanner ()
status ()
Prints a status message immediately.
parameters
string
quantcast (id )
Embeds the Quantcast web stats tracking code
parameters
string id Your Quantcast ID
Generated by JsDoc Toolkit 1.3.3 on Wed, 07 Jan 2009 13:55:22 GMT .
© Copyright 2007-2008 AppJet Inc.