Skip to content

nhellenbart/flagfinder

Repository files navigation

Flag Finder

Little javascript to find all Emoji flags in text.

code style: prettier

Installation

Get flagfinder via npm: npm install flagfinder --save.

Usage

Simply call the exported method with the input text containing Emoji flags as String parameter. The method returns all found Emoji flags in appearing order as Array of ISO 3166 country codes.

const flagfinder = require("./flagfinder.js");
flagfinder("Foo 🇩🇪 foobar 🇳🇱🇫🇮 baz");

returns [ 'DE', 'NL', 'FI' ].

or use it via import:

import flagfinder from "flagfinder";

Testing

Call npm test to run the testing using jest.

About

Little javascript to find all Emoji flags in text

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published