mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 11:22:19 +03:00
10 lines
393 B
JavaScript
10 lines
393 B
JavaScript
|
module.exports.twitterUrl = function twitterUrl(username) {
|
||
|
// Creates the canonical twitter URL without the '@'
|
||
|
return 'https://twitter.com/' + username.replace(/^@/, '');
|
||
|
};
|
||
|
|
||
|
module.exports.facebookUrl = function facebookUrl(username) {
|
||
|
// Handles a starting slash, this shouldn't happen, but just in case
|
||
|
return 'https://www.facebook.com/' + username.replace(/^\//, '');
|
||
|
};
|