lib/html2jsx.js
function trimEnd(haystack, needle) {
  return endsWith(haystack, needle)
    ? haystack.slice(0, -needle.length)
    : haystack;
}
function trimEnd(haystack, needle) {
  return endsWith(haystack, needle)
    ? haystack.slice(0, -needle.length)
    : haystack;
}
function trimEnd ( haystack , needle ) { return endsWith ( haystack , needle ) ? haystack . slice ( 0 , - needle . length ) : haystack ; }
Trim the specified substring off the string. If the string does not end
with the specified substring, this is a no-op.

@param {string} haystack String to search in
@param {string} needle   String to search for
@return {string}
Trim the specified substring off the string . If the string does not end with the specified substring this is a no - op .