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.

http://dotnetmafia.com/blogs/dotnettipoftheday/archive/2014/02/26/useful-javascript-for-working-with-sharepoint-display-templates-spc3000-spc14.aspx

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()) { }