@vacantthinker/firefox-addon-framework-easy 2026.624.1014 → 2026.624.1023

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.
@@ -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 title to a safe length and appends the .mp4
23
+ * Truncates a content to a safe length and appends the .mp4
22
24
  * extension.
23
25
  */
24
- export declare function serviceTitleToFilenameLimit(title: string | undefined, filenameLength?: number): string | undefined;
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
  */
@@ -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;AAGD;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,cAAc,GAAE,MAAW,GAC1B,MAAM,GAAG,SAAS,CAOpB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAQ/C"}
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,CAIpB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAK/C"}
@@ -44,17 +44,21 @@ 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 title to a safe length and appends the .mp4
54
+ * Truncates a content to a safe length and appends the .mp4
49
55
  * extension.
50
56
  */
51
- export function serviceTitleToFilenameLimit(title, filenameLength = 50) {
52
- if (!title)
57
+ export function serviceContentLimit(content, numLength) {
58
+ if (!content || !numLength)
53
59
  return undefined;
54
- // .slice() safely handles strings shorter than
55
- // MAX_FILENAME_LENGTH without throwing errors
56
- const truncatedTitle = title.slice(0, filenameLength);
57
- return serviceAppendExtMP4(truncatedTitle);
60
+ const contentLimit = content.slice(0, numLength);
61
+ return serviceAppendExtMP4(contentLimit);
58
62
  }
59
63
  /**
60
64
  * Appends the .mp4 extension to a given string.
@@ -62,7 +66,6 @@ export function serviceTitleToFilenameLimit(title, filenameLength = 50) {
62
66
  export function serviceAppendExtMP4(title) {
63
67
  if (!title)
64
68
  return undefined;
65
- // Prevents duplicating the extension if it's already there
66
69
  let extMP4 = '.mp4';
67
70
  if (title.toLowerCase().endsWith(extMP4))
68
71
  return title;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vacantthinker/firefox-addon-framework-easy",
3
- "version": "2026.0624.1014",
3
+ "version": "2026.0624.1023",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",