iso-data 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/package.json +5 -3
- package/dist/lib/get-country-data-from-country-code.d.ts +0 -16
- package/dist/lib/get-country-from-timezone.d.ts +0 -1
- package/dist/lib/get-country-name-from-country-code.d.ts +0 -2
- package/dist/lib/get-currency-data.d.ts +0 -19
- package/dist/lib/get-language-from-language-code.d.ts +0 -5
- package/dist/lib/get-timezone-offset.d.ts +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `iso-data` are written here, newest first. The format follows [Keep a Changelog](https://keepachangelog.com) and the versions follow [semantic versioning](https://semver.org).
|
|
4
|
+
|
|
5
|
+
## 0.1.1
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- The package is published from GitHub Actions with npm provenance, so each version links to the commit and the workflow that built it. No change of API.
|
|
10
|
+
- `CHANGELOG.md` is published with the package.
|
|
11
|
+
|
|
12
|
+
## 0.1.0
|
|
13
|
+
|
|
14
|
+
First release: `getCountry`, `getCurrency`, `getLanguage` and `getTimezone`, with localized names, native names, the main language, currency and timezones of a country, and timezone offsets for any date.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iso-data",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Zero-dependency countries, currencies, languages and timezones data with localized names",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jose Barcos",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"main": "dist/index.js",
|
|
12
12
|
"types": "dist/index.d.ts",
|
|
13
13
|
"files": [
|
|
14
|
-
"dist"
|
|
14
|
+
"dist",
|
|
15
|
+
"CHANGELOG.md"
|
|
15
16
|
],
|
|
16
17
|
"scripts": {
|
|
17
18
|
"data:fetch": "node scripts/fetch-data.mjs",
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
"test": "yarn build && node --test \"test/**/*.test.mjs\"",
|
|
22
23
|
"prepublishOnly": "yarn test",
|
|
23
24
|
"check-size": "npm pack --dry-run",
|
|
24
|
-
"release": "npm version patch
|
|
25
|
+
"release": "npm version patch",
|
|
25
26
|
"push": "git push --follow-tags"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
"tsup": "^8.5.1",
|
|
30
31
|
"typescript": "^6.0.3"
|
|
31
32
|
},
|
|
33
|
+
"packageManager": "yarn@4.14.1",
|
|
32
34
|
"engines": {
|
|
33
35
|
"node": ">=22.0.0"
|
|
34
36
|
},
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { CountryCode } from '../data';
|
|
2
|
-
export interface CountryData {
|
|
3
|
-
name: string;
|
|
4
|
-
localName: string;
|
|
5
|
-
language: {
|
|
6
|
-
isoCode: string;
|
|
7
|
-
name: string;
|
|
8
|
-
localName: string;
|
|
9
|
-
};
|
|
10
|
-
currency: {
|
|
11
|
-
isoCode: string;
|
|
12
|
-
name: string;
|
|
13
|
-
localName: string;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export declare function getCountryDataFromCountryCode(countryCode?: CountryCode | (string & {})): CountryData | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getCountryISOCodeFromTimezone(timezone: string | undefined): string | undefined;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CountryCode, CurrencyCode } from '../data';
|
|
2
|
-
export declare function getCurrencyDataFromCountryCode(countryCode: CountryCode | (string & {})): {
|
|
3
|
-
isoCode: string;
|
|
4
|
-
label: string;
|
|
5
|
-
nativeName: string;
|
|
6
|
-
} | undefined;
|
|
7
|
-
export declare function getCurrencyDataFromCurrencyCode(currencyCode: CurrencyCode | (string & {})): {
|
|
8
|
-
isoCode: string;
|
|
9
|
-
label: string;
|
|
10
|
-
symbol: string;
|
|
11
|
-
nativeName: string;
|
|
12
|
-
} | undefined;
|
|
13
|
-
export declare function getCurrencyDataFromCurrencyCodeAsync(currencyCode: CurrencyCode | (string & {})): Promise<{
|
|
14
|
-
isoCode: string;
|
|
15
|
-
label: string;
|
|
16
|
-
symbol: string;
|
|
17
|
-
nativeName: string;
|
|
18
|
-
} | undefined>;
|
|
19
|
-
export declare function getCurrencyNativeName(currencyCode: CurrencyCode | (string & {})): string | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getTimezoneOffset(timezone: string | undefined): number;
|