@moshevents/copy 0.9.6 → 0.9.7

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/lib/copy.d.ts CHANGED
@@ -861,6 +861,15 @@ export declare const copy: {
861
861
  readonly events: "events";
862
862
  readonly followers: "followers";
863
863
  readonly following: "following";
864
+ readonly eventsCount: (p: {
865
+ count: number;
866
+ }) => string;
867
+ readonly followersCount: (p: {
868
+ count: number;
869
+ }) => string;
870
+ readonly followingCount: (p: {
871
+ count: number;
872
+ }) => string;
864
873
  readonly yourConnections: "Your connections";
865
874
  readonly followedByNames: (p: {
866
875
  names: string | number;
package/lib/copy.js CHANGED
@@ -777,6 +777,22 @@ export const copy = {
777
777
  events: "events",
778
778
  followers: "followers",
779
779
  following: "following",
780
+ eventsCount: (p) => {
781
+ const n = Number(p.count);
782
+ if (n === 1)
783
+ return `${p.count} event`;
784
+ return `${p.count} events`;
785
+ },
786
+ followersCount: (p) => {
787
+ const n = Number(p.count);
788
+ if (n === 1)
789
+ return `${p.count} follower`;
790
+ return `${p.count} followers`;
791
+ },
792
+ followingCount: (p) => {
793
+ const n = Number(p.count);
794
+ return `${p.count} following`;
795
+ },
780
796
  yourConnections: "Your connections",
781
797
  followedByNames: (p) => `Followed by ${p.names}`,
782
798
  followedByOthers: (p) => `Followed by ${p.names} & others`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moshevents/copy",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "description": "Mosh — single source of truth for user-facing copy. Typed `copy` for web/admin; iOS consumes the SwiftPM target.",
5
5
  "type": "module",
6
6
  "files": [