lib/utils/identifierMapping.js
function mapLastPart(mapper, separator) {
  return str => {
    const idx = str.lastIndexOf(separator);
    const mapped = mapper(str.slice(idx + separator.length));
    return str.slice(0, idx + separator.length) + mapped;
  };
}
function mapLastPart(mapper, separator) {
  return str => {
    const idx = str.lastIndexOf(separator);
    const mapped = mapper(str.slice(idx + separator.length));
    return str.slice(0, idx + separator.length) + mapped;
  };
}
function mapLastPart ( mapper , separator ) { return str => { const idx = str . lastIndexOf ( separator ) ; const mapped = mapper ( str . slice ( idx + separator . length ) ) ; return str . slice ( 0 , idx + separator . length ) + mapped ; } ; }
Returns a function that splits the inputs string into pieces using `separator`, only calls `mapper` for the last part and concatenates the string back together. If no separators are found, `mapper` is called for the entire string.
Returns a function that splits the inputs string into pieces using separator only calls mapper for the last part and concatenates the string back together . If no separators are found mapper is called for the entire string .