Helpers and Utilities

A collection of useful generic helper functions.

Parsing a JSON string

Takes a well-formed JSON string and returns the resulting JavaScript value.

jQuery: $.parseJSON()

Strip leading and trailing white-space from string

Remove white-space characters from the beginning and end of a string.

jQuery: $.trim()

Test if a certain value exists in an array

Search for a specified value within an array and return its index (or -1 if not found).

jQuery: $.inArray()

Merge two JavaScript objects

Extend a JavaScript object with the key/value pairs of another.

jQuery: $.extend()

Set cookie, get cookie and delete cookie

Size optimized functions for creating, reading and erasing cookies in JavaScript.