Useful JavaScript to know when working with SharePoint Display Templates

This post has some really great examples for JavaScript helper methods and available properties for working with Display Templates in SharePoint 2013.

If you ever had to decide if your script is running on a SharePoint Foundation, use this one:

// Determine if the host is SharePoint Foundation
if (!Srch.U.isSPFSKU()) { }