chore: commit lint fixes for the api

This commit is contained in:
Bouncey
2019-02-06 14:19:58 +00:00
committed by mrugesh mohapatra
parent 010fa63e76
commit 07266b7e43
17 changed files with 159 additions and 154 deletions

View File

@ -2,25 +2,25 @@ exports.dasherize = function dasherize(name) {
return ('' + name)
.toLowerCase()
.replace(/\s/g, '-')
.replace(/[^a-z0-9\-\.]/gi, '')
.replace(/\:/g, '');
}
.replace(/[^a-z0-9\-.]/gi, '')
.replace(/:/g, '');
};
exports.nameify = function nameify(str) {
return ('' + str)
.replace(/[^a-zA-Z0-9\s]/g, '')
.replace(/\:/g, '');
}
return ('' + str).replace(/[^a-zA-Z0-9\s]/g, '').replace(/:/g, '');
};
exports.unDasherize = function unDasherize(name) {
return ('' + name)
// replace dash with space
.replace(/\-/g, ' ')
// strip nonalphanumarics chars except whitespace
.replace(/[^a-zA-Z\d\s]/g, '')
.trim();
}
return (
('' + name)
// replace dash with space
.replace(/-/g, ' ')
// strip nonalphanumarics chars except whitespace
.replace(/[^a-zA-Z\d\s]/g, '')
.trim()
);
};
exports.addPlaceholderImage = function addPlaceholderImage(name) {
return `https://identicon.org?t=${name}&s=256`;
}
};