Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
country-flags-svg
Advanced tools
Readme
A list of countries with url links to a svg image which you can simply use in your web application
$ npm install country-flags-svg
or
$ yarn add country-flags-svg
import { findFlagUrlByNationality } from "country-flags-svg";
const flagUrl = findFlagUrlByNationality("Australian");
// => "http://upload.wikimedia.org/wikipedia/commons/8/88/Flag_of_Australia_%28converted%29.svg"
import { countries } from "country-flags-svg";
const australia = countries[0];
console.log(australia);
/* => {
name: "Australia",
demonym: "Australian",
flag: "http://upload.wikimedia.org/wikipedia/commons/8/88/Flag_of_Australia_%28converted%29.svg",
iso2: "AU",
iso3: "AUS",
}
*/
countries
Returns all available information.
findFlagUrlByCountryName(countryName)
Returns SVG link of the official flag for a specified country (according to countryName) or empty string if is not exist
findFlagUrlByNationality(nationality)
Returns SVG link of the official flag for a specified country (according to nationality) or empty string if is not exist
findFlagUrlByIso2Code(iso2Code)
Returns SVG link of the official flag for a specified country (according to ISO 3166-1 alpha-2 code) or empty string if is not exist
findFlagUrlByIso3Code(iso3Code)
Returns SVG link of the official flag for a specified country (according to ISO 3166-1 alpha-3 code) or empty string if is not exist
The full list of available flags you can see on the Docs page
if not enough don't be shy and provide merge request ;)
Licensed under MIT.
FAQs
A list of countries with url links to a svg image which you can simply use in your web application
The npm package country-flags-svg receives a total of 6,202 weekly downloads. As such, country-flags-svg popularity was classified as popular.
We found that country-flags-svg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.