feat: Use prettier-eslint to format code
This commit is contained in:
committed by
mrugesh mohapatra
parent
1ba67c4e2b
commit
b13e5fb41a
@ -1,18 +1,18 @@
|
||||
const githubRegex = (/github/i);
|
||||
const githubRegex = /github/i;
|
||||
const providerHash = {
|
||||
facebook: ({ id }) => id,
|
||||
github: ({ username }) => username,
|
||||
twitter: ({ username }) => username,
|
||||
linkedin({ _json }) {
|
||||
return _json && _json.publicProfileUrl || null;
|
||||
return (_json && _json.publicProfileUrl) || null;
|
||||
},
|
||||
google: ({ id }) => id
|
||||
};
|
||||
|
||||
export function getUsernameFromProvider(provider, profile) {
|
||||
return typeof providerHash[provider] === 'function' ?
|
||||
providerHash[provider](profile) :
|
||||
null;
|
||||
return typeof providerHash[provider] === 'function'
|
||||
? providerHash[provider](profile)
|
||||
: null;
|
||||
}
|
||||
|
||||
// createProfileAttributes(provider: String, profile: {}) => Object
|
||||
@ -32,13 +32,7 @@ function createProfileAttributesFromGithub(profile) {
|
||||
const {
|
||||
profileUrl: githubProfile,
|
||||
username,
|
||||
_json: {
|
||||
avatar_url: picture,
|
||||
blog: website,
|
||||
location,
|
||||
bio,
|
||||
name
|
||||
} = {}
|
||||
_json: { avatar_url: picture, blog: website, location, bio, name } = {}
|
||||
} = profile;
|
||||
return {
|
||||
name,
|
||||
|
Reference in New Issue
Block a user