committed by
Sacha Al Himdani
parent
44898be9d3
commit
55e85e5f67
@@ -1,5 +1,5 @@
|
||||
export { objectKeys, objectEntries, cleanFormData } from "./object";
|
||||
export { sprintf, faviconUrl, slugify } from "./string";
|
||||
export { sprintf, faviconUrl, slugify, domain } from "./string";
|
||||
export {
|
||||
getTreatment,
|
||||
getRiskImpacts,
|
||||
@@ -12,14 +12,37 @@ export { randomInt } from "./number";
|
||||
export { getMeasureStateLabel, measureStates } from "./measure";
|
||||
export { getRole, getRoles, peopleRoles } from "./people";
|
||||
export { certificationCategoryLabel, certifications } from "./certifications";
|
||||
export { getCountryName, getCountryOptions, getCountryLabel, countries, type CountryCode } from "./countries";
|
||||
export {
|
||||
getCountryName,
|
||||
getCountryOptions,
|
||||
getCountryLabel,
|
||||
countries,
|
||||
type CountryCode,
|
||||
} from "./countries";
|
||||
export { availableFrameworks } from "./frameworks";
|
||||
export { getDocumentTypeLabel, documentTypes } from "./documents";
|
||||
export { getAssetTypeVariant, getCriticityVariant } from "./assets";
|
||||
export { getSnapshotTypeLabel, getSnapshotTypeUrlPath, snapshotTypes, validateSnapshotConsistency } from "./snapshots";
|
||||
export { getAuditStateLabel, getAuditStateVariant, auditStates } from "./audits";
|
||||
export { getStatusVariant, getStatusLabel, getStatusOptions } from "./registryStatus";
|
||||
export { getObligationStatusVariant, getObligationStatusLabel, getObligationStatusOptions } from "./obligationStatus";
|
||||
export {
|
||||
getSnapshotTypeLabel,
|
||||
getSnapshotTypeUrlPath,
|
||||
snapshotTypes,
|
||||
validateSnapshotConsistency,
|
||||
} from "./snapshots";
|
||||
export {
|
||||
getAuditStateLabel,
|
||||
getAuditStateVariant,
|
||||
auditStates,
|
||||
} from "./audits";
|
||||
export {
|
||||
getStatusVariant,
|
||||
getStatusLabel,
|
||||
getStatusOptions,
|
||||
} from "./registryStatus";
|
||||
export {
|
||||
getObligationStatusVariant,
|
||||
getObligationStatusLabel,
|
||||
getObligationStatusOptions,
|
||||
} from "./obligationStatus";
|
||||
export { promisifyMutation } from "./relay";
|
||||
export { fileType, fileSize } from "./file";
|
||||
export { formatDatetime, formatDate } from "./date";
|
||||
|
||||
@@ -30,3 +30,11 @@ export function slugify(str: string): string {
|
||||
.replace(/[^a-z0-9 ]/g, "") // remove all chars not letters, numbers and spaces (to be replaced)
|
||||
.replace(/\s+/g, "-");
|
||||
}
|
||||
|
||||
export function domain(url: string): string {
|
||||
const parts = url.split("//");
|
||||
if (parts.length > 1) {
|
||||
url = parts[1];
|
||||
}
|
||||
return url.split("/")[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user