kinoklub-api
Advanced tools
Comparing version 0.0.1-next.3 to 0.0.1-next.4
@@ -13,2 +13,3 @@ import { HTMLElement } from 'node-html-parser'; | ||
export declare const getImage: (el: HTMLElement) => string; | ||
export declare const getTitleOriginalHelper: (info: string, parseString: string) => string | null; | ||
export declare const getTitleOriginal: (info: string) => string | null; |
@@ -46,5 +46,10 @@ export const getId = (el) => { | ||
}; | ||
export const getTitleOriginal = (info) => { | ||
export const getTitleOriginalHelper = (info, parseString) => { | ||
var _a, _b; | ||
return ((_b = (_a = info.split('Originální název:')[1]) === null || _a === void 0 ? void 0 : _a.split('/')[0]) === null || _b === void 0 ? void 0 : _b.trim()) || null; | ||
return ((_b = (_a = info.split(parseString)[1]) === null || _a === void 0 ? void 0 : _a.split('/')[0]) === null || _b === void 0 ? void 0 : _b.trim()) || null; | ||
}; | ||
export const getTitleOriginal = (info) => { | ||
return (getTitleOriginalHelper(info, 'Originální název:') || | ||
getTitleOriginalHelper(info, 'Original title:') || | ||
null); | ||
}; |
{ | ||
"name": "kinoklub-api", | ||
"version": "0.0.1-next.3", | ||
"version": "0.0.1-next.4", | ||
"description": "Support library for KinoKlub", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
16924
345