
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
libgnlibgn is a TypeScript/JavaScript library that makes it easy to access and manipulate geographical and administrative data about Guinea.
npm install libgn
or with pnpm:
pnpm add libgn
import libgn from "libgn";
// Get all regions of Guinea
console.log(libgn.allRegionNames);
// Result: ["Boké", "Conakry", "Faranah", "Kankan", "Kindia", "Labé", "Mamou", "N'Zérékoré"]
// Get basic information about Guinea
console.log(libgn.basicInfo);
// Result: { name: "Guinée", capital: "Conakry", motto: "Travail, Justice, Solidarité", ... }
// Basic information about Guinea
libgn.basicInfo
// Returns: { name, capital, motto, flag, isoCode, callingCode, population, area, currency }
// Capital
libgn.capital
// Returns: "Conakry"
// Languages
libgn.languages
// Returns: { official: "Français", national: ["Pular", "Maninka", "Susu", ...] }
// All regions with their complete data
libgn.allRegions
// Returns: Array<Region>
// Names of all regions
libgn.allRegionNames
// Returns: ["Boké", "Conakry", "Faranah", "Kankan", "Kindia", "Labé", "Mamou", "N'Zérékoré"]
// Codes of all regions
libgn.allRegionCodes
// Returns: ["BK", "CK", "FR", "KK", "KD", "LB", "MM", "NZ"]
// Prefectures of a specific region
libgn.getPrefecturesByRegion("Conakry")
// Returns: ["Conakry"]
// Population of a region
libgn.getRegionPopulation("Conakry")
// Returns: 1667864
// Area of a region (in km²)
libgn.getRegionArea("Conakry")
// Returns: 450
// All prefectures
libgn.allPrefectureNames
// Returns: ["Boké", "Boffa", "Fria", "Gaoual", "Koundara", "Conakry", ...]
// Sub-prefectures of a prefecture
libgn.getSubPrefecturesByPrefecture("Conakry")
// Returns: ["Kaloum", "Dixinn", "Matam", "Ratoma", "Matoto"]
// Region of a prefecture
libgn.getRegionOfPrefecture("Conakry")
// Returns: "Conakry"
// All neighborhoods of Conakry
libgn.allNeighborhoods
// Returns: ["Miniere Cité Secteur 2", "KASSA", "BOULBINET", ...]
// Neighborhoods of a specific sub-prefecture
libgn.getNeighborhoodsBySubPrefecture("Dixinn")
// Returns: ["Miniere Cité Secteur 2", "Cameroun Secteur 1", ...]
The library includes specific error classes for better error handling:
import {
RegionReferenceError,
PrefectureReferenceError,
SubPrefectureReferenceError
} from "libgn";
try {
libgn.getPrefecturesByRegion("Non-existent region");
} catch (error) {
if (error instanceof RegionReferenceError) {
console.log("Region not found");
}
}
# Install dependencies
pnpm install
# Compile TypeScript
pnpm build:pkg
# Development mode (watch)
pnpm dev
# Run tests
pnpm test
# Run tests once
pnpm test:run
# Generate coverage report
pnpm test:coverage
# Linting
pnpm lint
# Linting with auto-fix
pnpm lint:fix
This package is published under MIT License
If you have questions or need help regarding this package, don't hesitate to open an issue on GitHub.
FAQs
Manipulate geographical and administrative data about Guinea.
We found that libgn demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.