Blog

JavaScript – Namespace Function

One thing that most JavaScript writers do now, which is a good practice, is they create namespaces for their functions and variables. The following is a definition for a function that can be used to easily create namespaces of any depth: I have to admit, this idea is not originally Read more…

By Chris West, ago
Blog

JavaScript – GUID/UUID Generator

I was surfing the internet a bit today and starting thinking about universally unique IDs. I came across this site which generates the UUIDs on the server side and then decided to make my own pseudo globally unique ID generator: You can use this function to generate as many UUIDs Read more…

By Chris West, ago
Blog

JavaScript – Binary Search

The following is an implementation of a binary search for arrays which gives you the ability to do fuzzy matches (default), exact matches, or specify your own comparison function: I used the following to test the normal execution of this binary function:

By Chris West, ago