News
Projects
Standard Library
Articles
Scripts
Tools
Contact
Donate
Download
Create your own JavaScript Library
Mark the functions and methods you would like to include in your own library. The numbers in parenthesis is the size of the object in bytes without/with comments.
JavaScript is not enabled. Enabling JavaScript gives you the following features
Client-side dependency check.
View filesize of individual functions.
Select all
Array
Methods
copy
-
Copy an array
diff
-
Get the difference of n arrays
disjoint
-
Check whether two arrays are disjoint
intersect
-
Get the intersection of n arrays
mapFunction
-
Call a function on every member of an array
mapMethod
-
Apply a method to all members of an array
pad
-
Pad an array to a given size with a given value
randomize
-
Randomize elements in an array
remove
-
Remove elements from an array
union
-
Get the union of n arrays
unique
-
Remove any duplicates from an array
Cookie
Constants
pairSeparator
-
The token separating name/value pairs in the cookie.
valueSeparator
-
The token separating name and values in the cookie.
Constructor
Cookie
-
Cookie constructor function.
Functions
decode
-
The function for decoding cookie values.
encode
-
The function for encoding cookie values.
isEnabled
-
Check whether cookies are enabled in the browser.
read
-
Retreive a named cookie.
Methods
remove
-
Delete a cookie.
toString
-
View contents of the cookie
write
-
Store a cookie.
Date
Constants
nameOfDays
-
The names of the week days
nameOfMonths
-
The name of months
Functions
getFirstDateInWeek
-
Returns the date of monday in any given year and week
parse
-
Create a date from a string.
Methods
format
-
Format a date
getDaysInMonth
-
Return the number of days in the month.
getDaySuffix
-
Get the english suffix for dates
getISODay
-
Return the ISO day number of the week.
getISOWeek
-
Return the ISO week number of the year of a date.
getNameOfDay
-
Get the name of the day
getNameOfMonth
-
Get the name of a month
getTimezoneOffset
-
Get the local timezone offset from UTS in minutes.
isLeapYear
-
Check whether a date belongs to a leap year.
setISOWeek
-
Set the ISO week number of the year of a date
Error
Constants
lineSeparator
-
A token for separating sections.
Functions
enumerate
-
Enumerate an object for error reporting
getClientInfo
-
Get information about the client
getEventInfo
-
Get information about the event object in an error
getFilename
-
Get the filename related to an error
getLinenumber
-
The relevant linenumber for an error
getStackTrace
-
Get a stack trace when an error occurs.
report
-
Create a comprehensive error report for logging.
Function
Methods
defer
-
Defer execution of a function.
getArguments
-
Get the argument names of a functions
getBody
-
Get the body section of a function
getName
-
Get the name of a function
memoize
-
Memoize (cache) the output of a function.
removeErrorHandler
-
Remove a previously set handler
setErrorHandler
-
Set a error handler for the function.
time
-
Get the execution time of a function
HTMLElement
Methods
getNodesByType
-
Get an array of nodes based on node type.
getPosition
-
Get the absolute position of an element.
hasScrollbars
-
Detect whether an element has scrollbars.
insertAfter
-
Insert a node after another node
HTMLFieldSetElement
Methods
disable
-
Disable or enable all input elements in a fieldset.
Math
Functions
fibonacci
-
Find the nth Fibonacci number.
logN
-
Compute the logarithm of a number using any base.
nRoot
-
Compute the nth root of x
randomN
-
Generate a random number
Number
Methods
isFloat
-
Check whether a number is a float
isInteger
-
Check whether a number is an integer
toHex
-
Return the hexidecimal string representation of an integer
String
Methods
br2nl
-
Convert <br> to newline.
levenshtein
-
Calculate the Levensthein distance (LD) of two strings
nbsp2s
-
Convert   to space.
substrCount
-
Count the number of times a substring is in a string.
trim
-
Removes any whitespace character from before and after the string
trimAll
-
Removes redundant whitespace in the string.
trimLeft
-
Remove leading whitespace from the string.
trimRight
-
Remove trailing whitespace from a string.
XHR
Constructor
XHR
-
XHR constructor function.
Functions
isEnabled
-
Check whether the client supports XMLHttpRequests
Methods
abort
-
Abort a request
getAllResponseHeaders
-
Get all response headers from a request.
getResponseHeader
-
Get a single response header
open
-
Open a request before sending.
reset
-
Reset a XMLHttpRequest to uninitialized
retry
-
Force retry of a request
send
-
Send a request
setRequestHeader
-
Set a request header.
toString
-
Convert a XHR object to a string.
Create file
With comments.
Without comments.
Minimizing the file size by stripping all comments and format is currently a beta function. Please report any problems using our
contact form
.