@qntm-code/utils
Version:
A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.
11 lines (10 loc) • 345 B
JavaScript
import { capitalise } from './capitalise';
/**
* Capitalises the last n characters of a string
* @param value the string to capitalise
* @param number the number of characters to capitalise (default 1)
*/
export function capitaliseLast(value, number = 1) {
const start = value.length - number;
return capitalise(value, { start });
}