Skip to content

Commit

Permalink
Merge pull request #37 from p-l-/clean-up
Browse files Browse the repository at this point in the history
Clean flag_emoji()
  • Loading branch information
p-l- authored Jan 27, 2023
2 parents 6e8877f + 8e7040c commit 9567384
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 5 deletions.
Binary file modified doc/screenshots/address_1password.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/screenshots/domain_1password.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/screenshots/graph_thunderbird.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/screenshots/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/screenshots/usage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,12 @@ function create_folder(vault: Vault, base: string) {
/* continue regardless of error */
}
}
// https://dev.to/jorik/country-code-to-flag-emoji-a21
function flag_emoji(country_code: string): string {
const codePoints = country_code
return country_code
.toUpperCase()
.split("")
.map((char) => 127397 + char.charCodeAt(0));
return String.fromCodePoint(...codePoints);
.replace(/[A-Z]/g, (char) =>
String.fromCodePoint(127397 + char.charCodeAt(0))
);
}
function tag_emoji(tag: IvreTag): string | undefined {
switch (tag.type) {
Expand Down

0 comments on commit 9567384

Please sign in to comment.