guessit-js 3.8.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/README.md +174 -0
- package/dist/api.d.ts +41 -0
- package/dist/config/index.d.ts +9 -0
- package/dist/guessit-js.cjs +10050 -0
- package/dist/guessit-js.cjs.map +1 -0
- package/dist/guessit-js.js +10050 -0
- package/dist/guessit-js.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.html +675 -0
- package/dist/language/data.d.ts +24 -0
- package/dist/language/index.d.ts +68 -0
- package/dist/openapi.json +617 -0
- package/dist/options.d.ts +35 -0
- package/dist/reutils.d.ts +8 -0
- package/dist/rules/common/comparators.d.ts +12 -0
- package/dist/rules/common/date.d.ts +6 -0
- package/dist/rules/common/expected.d.ts +7 -0
- package/dist/rules/common/formatters.d.ts +20 -0
- package/dist/rules/common/index.d.ts +27 -0
- package/dist/rules/common/numeral.d.ts +7 -0
- package/dist/rules/common/pattern.d.ts +7 -0
- package/dist/rules/common/quantity.d.ts +21 -0
- package/dist/rules/common/validators.d.ts +8 -0
- package/dist/rules/common/words.d.ts +6 -0
- package/dist/rules/index.d.ts +23 -0
- package/dist/rules/markers/groups.d.ts +9 -0
- package/dist/rules/markers/path.d.ts +3 -0
- package/dist/rules/processors.d.ts +53 -0
- package/dist/rules/properties/audio_codec.d.ts +3 -0
- package/dist/rules/properties/bit_rate.d.ts +3 -0
- package/dist/rules/properties/bonus.d.ts +3 -0
- package/dist/rules/properties/cd.d.ts +3 -0
- package/dist/rules/properties/container.d.ts +3 -0
- package/dist/rules/properties/country.d.ts +3 -0
- package/dist/rules/properties/crc.d.ts +3 -0
- package/dist/rules/properties/date.d.ts +6 -0
- package/dist/rules/properties/edition.d.ts +3 -0
- package/dist/rules/properties/episode_title.d.ts +3 -0
- package/dist/rules/properties/episodes.d.ts +22 -0
- package/dist/rules/properties/film.d.ts +3 -0
- package/dist/rules/properties/language.d.ts +17 -0
- package/dist/rules/properties/mimetype.d.ts +3 -0
- package/dist/rules/properties/other.d.ts +4 -0
- package/dist/rules/properties/part.d.ts +3 -0
- package/dist/rules/properties/release_group.d.ts +3 -0
- package/dist/rules/properties/screen_size.d.ts +10 -0
- package/dist/rules/properties/size.d.ts +3 -0
- package/dist/rules/properties/source.d.ts +3 -0
- package/dist/rules/properties/streaming_service.d.ts +3 -0
- package/dist/rules/properties/title.d.ts +6 -0
- package/dist/rules/properties/type.d.ts +6 -0
- package/dist/rules/properties/video_codec.d.ts +3 -0
- package/dist/rules/properties/website.d.ts +3 -0
- package/dist/wasm-test.html +467 -0
- package/package.json +70 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language data lookup table — port of babelfish with custom additions
|
|
3
|
+
*/
|
|
4
|
+
export interface LanguageData {
|
|
5
|
+
alpha3: string;
|
|
6
|
+
alpha2?: string;
|
|
7
|
+
name: string;
|
|
8
|
+
opensubtitles?: string;
|
|
9
|
+
country?: string;
|
|
10
|
+
script?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const LANGUAGES: LanguageData[];
|
|
13
|
+
export declare const ALPHA3_MAP: Map<string, LanguageData>;
|
|
14
|
+
export declare const ALPHA2_MAP: Map<string, LanguageData>;
|
|
15
|
+
export declare const NAME_MAP: Map<string, LanguageData>;
|
|
16
|
+
export declare const OPENSUBTITLES_MAP: Map<string, LanguageData>;
|
|
17
|
+
/**
|
|
18
|
+
* Guessit synonym mappings from config
|
|
19
|
+
*/
|
|
20
|
+
export declare const GUESSIT_SYNONYMS: Record<string, string[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Countries data
|
|
23
|
+
*/
|
|
24
|
+
export declare const COUNTRIES: Record<string, string>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export declare class Language {
|
|
2
|
+
alpha3: string;
|
|
3
|
+
country?: string;
|
|
4
|
+
script?: string;
|
|
5
|
+
constructor(alpha3: string, country?: string, script?: string);
|
|
6
|
+
/**
|
|
7
|
+
* Convert to string representation: "eng" or "eng-US"
|
|
8
|
+
*/
|
|
9
|
+
toString(): string;
|
|
10
|
+
/**
|
|
11
|
+
* Get the language name
|
|
12
|
+
*/
|
|
13
|
+
getName(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Get the alpha2 code if available
|
|
16
|
+
*/
|
|
17
|
+
getAlpha2(): string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Get the OpenSubtitles code if available
|
|
20
|
+
*/
|
|
21
|
+
getOpenSubtitles(): string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Create a Language from a string (main lookup method)
|
|
24
|
+
* Tries multiple formats: alpha3, alpha2, name, IETF, OpenSubtitles, synonyms
|
|
25
|
+
*/
|
|
26
|
+
static fromString(value: string): Language | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Create a Language from alpha3 code
|
|
29
|
+
*/
|
|
30
|
+
static fromAlpha3(code: string): Language | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Create a Language from alpha2 code
|
|
33
|
+
*/
|
|
34
|
+
static fromAlpha2(code: string): Language | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Create a Language from language name
|
|
37
|
+
*/
|
|
38
|
+
static fromName(name: string): Language | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Create a Language from OpenSubtitles code
|
|
41
|
+
*/
|
|
42
|
+
static fromOpenSubtitles(code: string): Language | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Create a Language from IETF language tag (e.g., "en-US", "pt-BR")
|
|
45
|
+
*/
|
|
46
|
+
static fromIetf(tag: string): Language | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Create a Language from a guessit synonym
|
|
49
|
+
*/
|
|
50
|
+
static fromSynonym(value: string): Language | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Check equality
|
|
53
|
+
*/
|
|
54
|
+
equals(other: Language): boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Special language instances
|
|
58
|
+
*/
|
|
59
|
+
export declare const UNDETERMINED: Language;
|
|
60
|
+
export declare const MULTIPLE: Language;
|
|
61
|
+
/**
|
|
62
|
+
* Non-specific languages set
|
|
63
|
+
*/
|
|
64
|
+
export declare const NON_SPECIFIC_LANGUAGES: Set<Language>;
|
|
65
|
+
/**
|
|
66
|
+
* Check if a language is non-specific
|
|
67
|
+
*/
|
|
68
|
+
export declare function isNonSpecific(lang: Language): boolean;
|