@eeplatform/nuxt-layer-common 1.2.4 → 1.2.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eeplatform/nuxt-layer-common
2
2
 
3
+ ## 1.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 3bf853d: Add util function
8
+
3
9
  ## 1.2.4
4
10
 
5
11
  ### Patch Changes
@@ -265,6 +265,12 @@ export default function useUtils() {
265
265
  return params;
266
266
  }
267
267
 
268
+ function toOrdinal(n: number): string {
269
+ const s = ["th", "st", "nd", "rd"];
270
+ const v = n % 100;
271
+ return n + (s[(v - 20) % 10] || s[v] || s[0]);
272
+ }
273
+
268
274
  return {
269
275
  requiredRule,
270
276
  emailRule,
@@ -290,5 +296,6 @@ export default function useUtils() {
290
296
  getRouteParam,
291
297
  replaceMatch,
292
298
  setRouteParams,
299
+ toOrdinal,
293
300
  };
294
301
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@eeplatform/nuxt-layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "1.2.4",
5
+ "version": "1.2.5",
6
6
  "main": "./nuxt.config.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"