@vacantthinker/firefox-addon-framework-easy 2026.624.1014 → 2026.624.1029
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/dist/serviceGet.d.ts +4 -2
- package/dist/serviceGet.d.ts.map +1 -1
- package/dist/serviceGet.js +10 -8
- package/package.json +1 -1
package/dist/serviceGet.d.ts
CHANGED
|
@@ -17,11 +17,13 @@ export declare function serviceParseURL(targetUrl: string): URL | undefined;
|
|
|
17
17
|
* @returns The formatted timestamp string.
|
|
18
18
|
*/
|
|
19
19
|
export declare function serviceGetCurrentDateYYYYMMDDHHMMSS(): string;
|
|
20
|
+
export declare function serviceContentLimit80(content: string | undefined, numLength?: number): string | undefined;
|
|
21
|
+
export declare function serviceContentLimit50(content: string | undefined, numLength?: number): string | undefined;
|
|
20
22
|
/**
|
|
21
|
-
* Truncates a
|
|
23
|
+
* Truncates a content to a safe length and appends the .mp4
|
|
22
24
|
* extension.
|
|
23
25
|
*/
|
|
24
|
-
export declare function
|
|
26
|
+
export declare function serviceContentLimit(content: string | undefined, numLength: number): string | undefined;
|
|
25
27
|
/**
|
|
26
28
|
* Appends the .mp4 extension to a given string.
|
|
27
29
|
*/
|
package/dist/serviceGet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serviceGet.d.ts","sourceRoot":"","sources":["../src/serviceGet.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,sBAKjD;AAED,UAAU,OAAO;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,eAAe,CAAC;CAC/B;AAED,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CASxC;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,mBAGhD;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,IAAI,MAAM,CAY5D;
|
|
1
|
+
{"version":3,"file":"serviceGet.d.ts","sourceRoot":"","sources":["../src/serviceGet.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,sBAKjD;AAED,UAAU,OAAO;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,eAAe,CAAC;CAC/B;AAED,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CASxC;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,mBAGhD;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,IAAI,MAAM,CAY5D;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,SAAS,GAAE,MAAW,sBAGvB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,SAAS,GAAE,MAAW,sBAGvB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,SAAS,CAGpB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAK/C"}
|
package/dist/serviceGet.js
CHANGED
|
@@ -44,17 +44,20 @@ export function serviceGetCurrentDateYYYYMMDDHHMMSS() {
|
|
|
44
44
|
const milliseconds = date.getMilliseconds();
|
|
45
45
|
return `${year}_${month}_${day}_${hours}h_${minutes}m_${seconds}s_${milliseconds}`;
|
|
46
46
|
}
|
|
47
|
+
export function serviceContentLimit80(content, numLength = 80) {
|
|
48
|
+
return serviceContentLimit(content, numLength);
|
|
49
|
+
}
|
|
50
|
+
export function serviceContentLimit50(content, numLength = 50) {
|
|
51
|
+
return serviceContentLimit(content, numLength);
|
|
52
|
+
}
|
|
47
53
|
/**
|
|
48
|
-
* Truncates a
|
|
54
|
+
* Truncates a content to a safe length and appends the .mp4
|
|
49
55
|
* extension.
|
|
50
56
|
*/
|
|
51
|
-
export function
|
|
52
|
-
if (!
|
|
57
|
+
export function serviceContentLimit(content, numLength) {
|
|
58
|
+
if (!content || !numLength)
|
|
53
59
|
return undefined;
|
|
54
|
-
|
|
55
|
-
// MAX_FILENAME_LENGTH without throwing errors
|
|
56
|
-
const truncatedTitle = title.slice(0, filenameLength);
|
|
57
|
-
return serviceAppendExtMP4(truncatedTitle);
|
|
60
|
+
return content.slice(0, numLength);
|
|
58
61
|
}
|
|
59
62
|
/**
|
|
60
63
|
* Appends the .mp4 extension to a given string.
|
|
@@ -62,7 +65,6 @@ export function serviceTitleToFilenameLimit(title, filenameLength = 50) {
|
|
|
62
65
|
export function serviceAppendExtMP4(title) {
|
|
63
66
|
if (!title)
|
|
64
67
|
return undefined;
|
|
65
|
-
// Prevents duplicating the extension if it's already there
|
|
66
68
|
let extMP4 = '.mp4';
|
|
67
69
|
if (title.toLowerCase().endsWith(extMP4))
|
|
68
70
|
return title;
|