mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-27 03:03:37 -05:00
* working: rename OrganizationTeamsList to PaginatedDataList * convert org notifications list fully to PaginatedDataList * update NotificationList tests * refactor org access to use PaginatedDataList * update tests for org access refactor; fix pagination & sorting * restore Add Role functionality to Org roles * fix displayed text when list of items is empty * preserve query params when navigating through pagination * fix bugs after RBAC rebase * fix lint errors, fix add org access button
17 lines
319 B
JavaScript
17 lines
319 B
JavaScript
|
|
export function pluralize (str) {
|
|
return str[str.length - 1] === 's' ? `${str}es` : `${str}s`;
|
|
}
|
|
|
|
export function getArticle (str) {
|
|
const first = str[0];
|
|
if (('aeiou').includes(first)) {
|
|
return 'an';
|
|
}
|
|
return 'a';
|
|
}
|
|
|
|
export function ucFirst (str) {
|
|
return `${str[0].toUpperCase()}${str.substr(1)}`;
|
|
}
|