lib/rfr.js
function coerceRoot(root) {
  var coerced = root.substring().trim();
  var len = coerced.length;
  if (len > 0 && coerced[len - 1] !== '/') {
    coerced = coerced + '/';
  }
  return coerced;
}
function coerceRoot(root) {
  var coerced = root.substring().trim();
  var len = coerced.length;
  if (len > 0 && coerced[len - 1] !== '/') {
    coerced = coerced + '/';
  }
  return coerced;
}
function coerceRoot ( root ) { var coerced = root . substring ( ) . trim ( ) ; var len = coerced . length ; if ( len > 0 && coerced [ len - 1 ] !== '/' ) { coerced = coerced + '/' ; } return coerced ; }
Trim a root and add tailing slash if not exists.
@param {String} root A root.
@returns {String} The coerced root.
@private
Trim a root and add tailing slash if not exists .