Gathering detailed insights and metrics for all-spanish-cities
Gathering detailed insights and metrics for all-spanish-cities
Gathering detailed insights and metrics for all-spanish-cities
Gathering detailed insights and metrics for all-spanish-cities
A library that provides data on Spain's autonomies, provinces, and cities, including their codes, names, flags, and coats of arms for seamless integration into your applications.
npm install all-spanish-cities
Typescript
Module System
Node Version
NPM Version
79.9
Supply Chain
99.6
Quality
75.8
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
5,283
Last Day
1
Last Week
51
Last Month
359
Last Year
3,589
MIT License
2 Stars
102 Commits
2 Forks
2 Watchers
1 Branches
2 Contributors
Updated on Mar 09, 2025
Minified
Minified + Gzipped
Latest Version
2.0.2
Package Id
all-spanish-cities@2.0.2
Unpacked Size
1.62 MB
Size
112.41 kB
File Count
18
NPM Version
9.5.1
Node Version
18.16.0
Published on
Nov 01, 2023
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
-48%
51
Compared to previous week
Last Month
40.8%
359
Compared to previous month
Last Year
193.5%
3,589
Compared to previous year
2
all-spanish-cities
A library that provides data on Spain's autonomies, provinces, and cities, including their codes, names, flags, and coats of arms for seamless integration into your applications.
1npm install all-spanish-cities
1import { autonomies } from "all-spanish-cities"; 2 3console.log(autonomies()); 4// [ 5// { 6// "code": "01", 7// "name": "Andalucía", 8// "flag": "...", 9// "coat_of_arms": "...", 10// }, 11// // …and many more 12// ] 13 14// You can filter by any of the following attributes. 15console.log(autonomies({ 16 code: '...', 17 name: '...', 18})); 19// [ 20// { ... }, 21// { ... }, 22// // autonomies that match your filters 23// ] 24 25// You can also include the provinces and cities of that autonomy. 26console.log(autonomies({ 27 with_provinces = true, 28 with_cities = true 29})); 30// [ 31// { 32// "code": "01", 33// "name": "Andalucía", 34// "flag": "...", 35// "coat_of_arms": "...", 36// "provinces": [{ ... }, { ... }] 37// "cities": [{ ... }, { ... }] 38// }, 39// // …and many more 40// ]
1import { provinces } from "all-spanish-cities"; 2 3console.log(provinces()); 4// [ 5// { 6// "code": "04", 7// "name": "Almería", 8// "code_autonomy": "01" 9// }, 10// // …and many more 11// ] 12 13// You can filter by any of the following attributes. 14console.log(provinces({ 15 code: '...', 16 code_autonomy: '...', 17 name: '...', 18})); 19// [ 20// { ... }, 21// { ... }, 22// // provinces that match your filters 23// ] 24 25// You can also include the autonomy and cities of that province. 26console.log(provinces({ 27 with_autonomy = true, 28 with_cities = true 29})); 30// [ 31// { 32// "code": "04", 33// "name": "Almería", 34// "code_autonomy": "01", 35// "flag": "...", 36// "coat_of_arms": "...", 37// "autonomy": { ... } 38// "cities": [{ ... }, { ... }] 39// }, 40// // …and many more 41// ]
1import { cities } from "all-spanish-cities"; 2 3console.log(cities()); 4// [ 5// { 6// "code": "010014", 7// "name": "Alegría-Dulantzi", 8// "code_autonomy": "16", 9// "code_province": "01", 10// "flag": null, 11// "coat_of_arms": null 12// }, 13// // …and many more 14// ] 15 16// You can filter by any of the following attributes. 17console.log(cities({ 18 code: '...', 19 code_autonomy: '...', 20 code_province: '...', 21 name: '...', 22})); 23// [ 24// { ... }, 25// { ... }, 26// // cities that match your filters 27// ] 28 29// You can also include the autonomy and cities of that province. 30console.log(cities({ 31 with_autonomy = true, 32 with_province = true 33})); 34// [ 35// { 36// "code": "010014", 37// "name": "Alegría-Dulantzi", 38// "code_autonomy": "16", 39// "code_province": "01", 40// "flag": null, 41// "coat_of_arms": null 42// "autonomy": { ... } 43// "province": { ... } 44// }, 45// // …and many more 46// ]
No vulnerabilities found.
No security vulnerabilities found.