Blog

JavaScript Snippet – suffixFileSize()

If you would like to convert the amount of bytes (or bits) into the corresponding measure when the size is a kilobyte or bigger (or a kilobit or bigger) you can use the following JavaScript function: Here are some examples of using it: // Convert bytes console.log(suffixFileSize(1023)); // 1023 B Read more…

By Chris West, ago
Blog

My Interactive Resume – Part 1

Here is my first quick pass at an online resume: http://CWestify.com/resume/ There are plenty of times when we want to add everything to our resume to let potential employers know our worth but it can be difficult to know how to really summarize everything. Project Search There are times when 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 – Number.getOrdinalFor()

Now Available in YourJS When dealing with numbers, at times for presentation’s sake, we need to add ordinals to numbers. For example, instead of today is the “September 28”, you may want to say that it is the “28th of September”. I wrote the following code snippet to easily add Read more…

By Chris West, ago