@doncicuto/es-ministries
v1.0.1
Published
Array containing the name and DIR3 code of Government ministries of Spain
Downloads
2
Maintainers
Readme
es-ministries
Government ministries of Spain names and DIR3 codes.
About DIR3, according to the Spanish Interoperability Scheme:
public administrations will maintain an updated list of their administrative bodies and registration and citizen service offices, and their relationships between them. Said bodies and offices will be uniquely codified and this codification will be disseminated among public administrations
The Common Directory provides a unified and common Inventory to the entire Administration of the organic units / public bodies, their associated offices and economic and budgetary management units, facilitating the distributed and jointly responsible maintenance of the information.
All organic units and their public bodies therefore have a code that uniquely identifies them called the DIR3 code.
Install
yarn add @doncicuto/es-ministries
or
npm install @doncicuto/es-ministries --save
Usage
The default export is an array of objects with the following structure:
| Property | Type | Description | Example |
| -------- | -------- | ------------- | ----------------------- |
| code
| string
| DIR3 code | E00003301
|
| name
| string
| Ministry name | Ministerio de Defensa
|
Example (Browser):
import ministries from "@doncicuto/es-ministries";
const names = ministries.map((p) => p.name);
console.log(names);
const filtered = ministries.filter((p) => p.code === "E00003301");
console.log(filtered);
Example (NodeJS):
const ministries = require("@doncicuto/es-ministries").default;
const names = ministries.map((p) => p.name);
console.log(names);
const filtered = ministries.filter((p) => p.code === "E00003301");
console.log(filtered);