@postrun/js 2.4.0 → 2.6.0

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/index.cjs CHANGED
@@ -6064,6 +6064,34 @@ function tiktokPrivacyLabel(value) {
6064
6064
  }
6065
6065
  }
6066
6066
 
6067
+ // src/linkedin.ts
6068
+ function linkedinPollDurationLabel(value) {
6069
+ switch (value) {
6070
+ case "ONE_DAY":
6071
+ return "1 day left";
6072
+ case "THREE_DAYS":
6073
+ return "3 days left";
6074
+ case "SEVEN_DAYS":
6075
+ return "1 week left";
6076
+ case "FOURTEEN_DAYS":
6077
+ return "2 weeks left";
6078
+ }
6079
+ }
6080
+
6081
+ // src/x.ts
6082
+ function plural(n, unit) {
6083
+ return `${n} ${unit}${n === 1 ? "" : "s"} left`;
6084
+ }
6085
+ function xPollDurationLabel(durationMinutes) {
6086
+ if (durationMinutes >= 1440) {
6087
+ return plural(Math.floor(durationMinutes / 1440), "day");
6088
+ }
6089
+ if (durationMinutes >= 60) {
6090
+ return plural(Math.floor(durationMinutes / 60), "hour");
6091
+ }
6092
+ return plural(durationMinutes, "minute");
6093
+ }
6094
+
6067
6095
  // src/tiktok-options.ts
6068
6096
  var TIKTOK_CAPTION_MAX = { video: 2200, photo: 4e3 };
6069
6097
  function captionMaxFor(postType) {
@@ -6446,6 +6474,7 @@ exports.interactionValueKey = interactionValueKey;
6446
6474
  exports.isInteractionForbidden = isInteractionForbidden;
6447
6475
  exports.isPostPlatform = isPostPlatform;
6448
6476
  exports.isPublished = isPublished;
6477
+ exports.linkedinPollDurationLabel = linkedinPollDurationLabel;
6449
6478
  exports.logsGet = logsGet;
6450
6479
  exports.logsList = logsList;
6451
6480
  exports.mediaCreate = mediaCreate;
@@ -6490,5 +6519,6 @@ exports.webhooksListEndpoints = webhooksListEndpoints;
6490
6519
  exports.webhooksListEventTypes = webhooksListEventTypes;
6491
6520
  exports.webhooksPing = webhooksPing;
6492
6521
  exports.webhooksUpdateEndpoint = webhooksUpdateEndpoint;
6522
+ exports.xPollDurationLabel = xPollDurationLabel;
6493
6523
  //# sourceMappingURL=index.cjs.map
6494
6524
  //# sourceMappingURL=index.cjs.map