Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

currency-flags

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

currency-flags

Flags for currency codes.

  • 3.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1K
decreased by-52.38%
Maintainers
2
Weekly downloads
 
Created
Source

currency-flags

This package outputs two CSS files (minified and unminified) with classes for currency codes.

Major version bump: Note that v3 of this library no longer inlines the images with base64 encoding, instead referencing them by wise.com asset URL. To continue self-hosting images, please stay on v2.

How to use

1. Install

npm install --save currency-flags

2. Add CSS to page

3. Use

<div class="currency-flag currency-flag-usd"></div>

The currency-flag selector has a default display of inline-block, size of 24x16 and a background-size of cover. currency-flag-sm, currency-flag-lg and currency-flag-xl modifiers are available.

Rectangular flag source images

While the main CSS file no longer references them, the source images for the rectangular flags are available in src/flags/${currency_code}.png.

Contributing

  1. Clone repo
  2. Add correctly sized (48x32) png files to static-assets
  3. Add a new line to src/styles.css for the new currency, referencing the static asset URL.
  4. Bump version number in package.json according to semver and add an item that a release will be based on to CHANGELOG.md. npm install to ensure the correct version in the lockfile.
  5. Submit your pull request from a feature branch and get code reviewed.
  6. If the pull request is approved and the CircleCI build passes, you will be able to squash and merge.
  7. Code will automatically be released to GitHub and published to npm according to the version specified in the changelog and package.json.

FAQs

Package last updated on 30 Apr 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc