* fix(layout): Fix Settings layout in firefox * chore(availableForHire): Remove available for hire setting * feat(helpers): Use helper components for Settings layout * fix(map): Fix undefined lang requested * feat(settings): Expand Settings page functionality * chore(pledge): Remove pledge from Settings * fix(about): Adjust AboutSettings layout * fix(portfolio): Improve PortfolioSettings layout * fix(email): Improve EmailSettings layout * fix(settings): Align save buttons with form fields * fix(AHP): Format AHP * fix(DangerZone): Adjust DangerZone layout * fix(projectSettings): Change Button Copy * fix(CertSettings): Fix certificate claim logic * chore(lint): Lint
		
			
				
	
	
		
			27 lines
		
	
	
		
			592 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			592 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| export function dasherize(name) {
 | |
|   return ('' + name)
 | |
|     .toLowerCase()
 | |
|     .replace(/\s/g, '-')
 | |
|     .replace(/[^a-z0-9\-\.]/gi, '')
 | |
|     .replace(/\:/g, '');
 | |
| }
 | |
| 
 | |
| export function nameify(str) {
 | |
|   return ('' + str)
 | |
|     .replace(/[^a-zA-Z0-9\s]/g, '')
 | |
|     .replace(/\:/g, '');
 | |
| }
 | |
| 
 | |
| export function unDasherize(name) {
 | |
|   return ('' + name)
 | |
|     // replace dash with space
 | |
|     .replace(/\-/g, ' ')
 | |
|     // strip nonalphanumarics chars except whitespace
 | |
|     .replace(/[^a-zA-Z\d\s]/g, '')
 | |
|     .trim();
 | |
| }
 | |
| 
 | |
| export function addPlaceholderImage(name) {
 | |
|   return `https://identicon.org?t=${name}&s=256`;
 | |
| }
 |