Making Your JavaScript More Functional

Functional Programming in JavaScript is all the rage right now, with new libraries, languages, and transpilers popping up everywhere. You might be thinking, “How do I make this radical paradigm shift?” The answer is, you don’t have to. Not right…

AngularJS RESTful Service Constructor

In my current role, I’m in a situation with numerous developers working on a single, large AngularJS project, with new API’s popping up every day, I want each developer to be able to crank out a new service to consume all the new API’s with little thought or effort. I decided to write a small, extensible RESTful constructor that does just that.

Find a Substring in a JavaScript Array

Last week a colleague asked me how to check if a substring exists in a JavaScript array and set that as a boolean flag. Assigning a boolean (or more accurately a value or 0) for the existence of a full string in an array is pretty easy, but a substring is a little different.

Passing arguments to a JavaScript callback function

In JavaScript, callback functions are used to perform an action or operation after another operation has occurred. The mechanics of a callback rely on the fact that everything in JavaScript is a first class object. This fact allows you to pass functions as arguments to another function. The latter function can then invoke that function at a predetermined point in the program.

Dynamic Title and Description with AngularJS and WordPress

When you serve your application that we’ve been making over the past 6 instalments, you’ll notice that the title and meta description tags are empty. We could set them to a static default, but they’d be the same on every page. This wouldn’t be terribly useful to your visitors, nor would it help when it came to SEO (search engine optimization) and how we appear on the SERP’s (search engine results page) would be less than desirable.

In part 7 of this series we will make a meta service that will set the title and meta description tags dynamically, determined by the title on content of the page that is currently being served.