Blog

JavaScript Snippet – isValidVarName()

Now Available in YourJS Recently I was working on a function which needed to determine whether or not a string could be used as a variable name. Variable name validation can get tricky so instead of using a crazy regular expression which includes all keywords (which may change over time) Read more…

By Chris West, ago
Blog

PHP – Problem with issetor()

In case you haven’t seen it before, issetor() is a quick and dirty way of getting a value from a variable that may or may not be defined: One unfortunate side-effect that most people are unaware of is that even though you can use this function without needing to worry Read more…

By Chris West, ago
Blog

JavaScript Snippet – getClass()

If you have been using JavaScript for a little bit you probably already know how to determine a variable’s class constructor, but just in case you are overthinking it here is a hint: variable.constructor. šŸ™‚ Of course, many times I like to make functions that will spit my results for Read more…

By Chris West, ago