0.2.0 • Published 3 days ago

@desoukysvyc/data-collector v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 days ago

@desoukysvyc/data-collector

The @desoukysvyc/data-collector npm package is a comprehensive collection of data related to ISO standard codes. It provides a simple and efficient way to access information about countries, languages, currencies, and more, based on ISO standards.

npm version

License

Installation

Install @desoukysvyc/data-collector with npm

  npm install @desoukysvyc/data-collector

Usage/Examples

Querying Countries

The package provides a convenient query method for filtering countries based on various criteria. Example:

import { countries } from "@desoukysvyc/data-collector";

const filteredCountries = countries.query({
  alpha2: "US",
  currencies: ["USD"],
  languages: ["eng"],
});

console.log(filteredCountries);

Output

[
    {
        "name": "United States",
        "alpha2": "US",
        "alpha3": "USA",
        "callingCode": "+1",
        "capital": "Washington, D.C.",
        "currencies": [
            "USD",
            "USN"
        ],
        "internetTld": [
            ".us"
        ],
        "languages": [
            "eng"
        ],
        "numericCode": "840",
        "officialName": "The United States of America",
        "secondaryName": "United States of America"
    },
]

Find countries with a specific calling code

const countriesWithCallingCode = countries.query({ callingCode: "+20" });

Output

[
     {
        "name": "Egypt",
        "alpha2": "EG",
        "alpha3": "EGY",
        "callingCode": "+20",
        "capital": "Cairo",
        "currencies": [
            "EGP"
        ],
        "internetTld": [
            ".eg"
        ],
        "languages": [
            "ara"
        ],
        "numericCode": "818",
        "officialName": "The Arab Republic of Egypt",
        "secondaryName": "Egypt"
    },
]

Accessing Football Federations

~ Including England,Scotland,etc.

import { countriesFootballFederations } from "@desoukysvyc/data-collector";

console.log(countriesFootballFederations);

Output

[
  {
    name: 'Albania',
    alpha2: 'AL',
    alpha3: 'ALB',
    internetTld: [ '.al' ],
    numericCode: '008',
    officialName: 'The Republic of Albania',
    country: 'Albania',
    code: 'ALB',
    federation: 'Albanian Football Association'
  },
  {
    name: 'Algeria',
    alpha2: 'DZ',
    alpha3: 'DZA',
    internetTld: [ '.dz' ],
    numericCode: '012',
    officialName: "The People's Democratic Republic of Algeria",
    country: 'Algeria',
    code: 'ALG',
    federation: 'Algerian Football Federation'
  },
  {
    country: 'England',
    code: 'ENG',
    federation: 'The Football Association'
  }
  ...169 more items
]

Advanced Querying with Lodash

Utilize the power of lodash functions to perform advanced queries:

import { countries } from "@desoukysvyc/data-collector";
import { filter, map, keyBy } from "lodash";

// Map countries to an object for quick lookup
const countriesMap = keyBy(countries, "alpha2");
const usaInfo = countriesMap["US"];

License

This project is licensed under the MIT License

Support and Donation

Support

If you encounter any issues or have questions about the @desoukysvyc/data-collector package, feel free to open an issue on the GitHub repository. We welcome your feedback and contributions!

0.2.0

3 days ago

0.0.30

4 months ago

0.0.29

4 months ago

0.0.23

5 months ago

0.0.24

5 months ago

0.0.25

5 months ago

0.0.26

5 months ago

0.0.28

5 months ago

0.0.22

6 months ago

0.0.21

6 months ago

0.0.20

6 months ago

0.0.18

6 months ago

0.0.17

6 months ago

0.0.16

6 months ago

0.0.15

6 months ago

0.0.14

6 months ago

0.0.13

6 months ago

0.0.12

6 months ago

0.0.11

6 months ago

0.0.10

6 months ago

0.0.6

6 months ago