Blog

ES6 – Convert To Integer

There are various ways to convert a string or a floating point number to an integer in JavaScript, but not all of them may suit your needs. In this post we will examine four different ways and then we will see which is the best in all cases. Solution #1: Read more…

By Chris West, ago
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

YourJS – 1st Pass

I finally have the 1st pass of YourJS available to the public!!! What is YourJS? YourJS is a fully customizable JavaScript library which gives the developer more control than ever before. Who controls the codebase? Everyone does! All you have to do is sign up and you can start writing 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
Blog

JavaScript Snippet – String.prototype.after()

WARNING: Extending native prototypes is frowned upon by many JS engineers but can be helpful as long as the extensions are properly documented in the codebase. SCRIPTER’S DISCRETION IS ADVISED. 😆 Yesterday I added a post about String.prototype.before(...). As is explained within the post, this function can be used to Read more…

By Chris West, ago