ensure-string-endswith
Creates a function that appends a given character to a string, if (and only if) it does not already end with that character.
usage
var anyString = 'anyString' stringEndingWithSlash = 'endsWith/' ensureStringEndsWithSlash = ; === anyString + '/'; // true === stringEndingWithSlash; // true