refactor: combine slug utils into one module
This commit is contained in:
committed by
mrugesh
parent
32ee2f032c
commit
9c2f1ffd82
@ -10,17 +10,6 @@ export {
|
||||
renderSignInEmail
|
||||
} from './auth';
|
||||
|
||||
export function dashify(str) {
|
||||
return ('' + str)
|
||||
.toLowerCase()
|
||||
.replace(/\s/g, '-')
|
||||
.replace(/[^a-z0-9\-.]/gi, '')
|
||||
.replace(/:/g, '');
|
||||
}
|
||||
// todo: unify with server/utils/index.js:dasherize
|
||||
const dasherize = dashify;
|
||||
export { dasherize };
|
||||
|
||||
export const fixCompletedChallengeItem = obj =>
|
||||
pick(obj, [
|
||||
'id',
|
||||
|
Reference in New Issue
Block a user