Skip to content

Commit

Permalink
CHANGED: to
Browse files Browse the repository at this point in the history
  • Loading branch information
taitems committed Oct 27, 2021
1 parent c33eacc commit eccd30a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "enrich-email",
"version": "0.0.12",
"version": "0.0.13",
"main": "dist/node/index.js",
"license": "MIT",
"author": "Tait Brown <taitbrown@gmail.com>",
Expand Down
7 changes: 6 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ enrich('taitbrown@gmail.com').then(console.log)
// name: 'Tait Brown',
// displayName: 'taitems',
// company: 'A Cloud Guru',
// avatar_url: 'https://avatars.githubusercontent.com/u/234593?v=4',
// avatarUrl: 'https://avatars.githubusercontent.com/u/234593?v=4',
// location: 'Melbourne, Australia',
// twitterUsername: 'taitems',
// twitterUrl: 'https://twitter.com/taitems',
// githubUsername: 'taitems',
// githubUrl: 'https://github.com/taitems'
// },
// profiles: {
Expand Down Expand Up @@ -101,6 +102,10 @@ Not really a question, but okay! Keep in mind this only searching for publicly s
As per the above, the accuracy is only as good as the publicly accessible information about a particular user. It makes a series of guesses and dynamically reprioritises results based on perceived accuracy (Pending release).


## Breaking chages
#### `0.0.13`
- Changed `guess.avatar_url` to `guess.avatarUrl` to standardise casing

## Contributors

- 🇦🇺 [Tait Brown](https://github.com/taitems) - Package creator/maintainer
Expand Down
2 changes: 1 addition & 1 deletion src/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const transform = (ghProfile, gravProfile, inferredName, companyFromEmail) => {
name: bestName(ghProfile, gravProfile, inferredName),
displayName: gravProfile?.[0].displayName,
company: ghProfile?.company || companyFromEmail,
avatar_url: ghProfile?.avatar_url || gravProfile?.[0].photos?.[0].value,
avatarUrl: ghProfile?.avatar_url || gravProfile?.[0].photos?.[0].value,
location: ghProfile?.location,
twitterUsername: ghProfile?.twitter_username,
twitterUrl: ghProfile?.twitter_username ? `https://twitter.com/${ghProfile.twitter_username}` : null,
Expand Down
2 changes: 1 addition & 1 deletion src/transform.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test('If all arguments are given', async () => {
expect(guess.name).toBe(GITHUB_NAME);
expect(guess.displayName).toBe(GRAVATAR_DISPLAY_NAME);
expect(guess.company).toBe(EXAMPLE_DOMAIN);
expect(guess.avatar_url).toBe(GITHUB_AVATAR_URL);
expect(guess.avatarUrl).toBe(GITHUB_AVATAR_URL);
expect(guess.githubUrl).toBe(GITHUB_PROFILE_URL);
expect(guess.githubUsername).toBe(GITHUB_USERNAME);

Expand Down

0 comments on commit eccd30a

Please sign in to comment.