@lipemat/js-boilerplate-shared 1.0.2 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lipemat/js-boilerplate-shared",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "license": "MIT",
5
5
  "description": "Shared utilities for all @lipemat boilerplate packages",
6
6
  "engines": {
@@ -47,6 +47,7 @@
47
47
  "clean-css": "^5.3.3",
48
48
  "core-js": "^3.33.1",
49
49
  "glob": "^13.0.0",
50
+ "identity-obj-proxy": "^3.0.0",
50
51
  "postcss": "^8.5.10",
51
52
  "postcss-color-mod-function": "^4.1.1",
52
53
  "postcss-custom-media": "^8.0.1",
@@ -60,8 +61,9 @@
60
61
  "devDependencies": {
61
62
  "@jest/types": "^30.2.0",
62
63
  "@lipemat/eslint-config": "^5.2.0-beta.1",
63
- "@lipemat/js-boilerplate-shared": "link:.",
64
+ "@lipemat/js-boilerplate-shared": "portal:.",
64
65
  "@types/babel__preset-env": "^7",
66
+ "@types/identity-obj-proxy": "^3",
65
67
  "@types/jest": "^30.0.0",
66
68
  "@types/node": "^22.19.3",
67
69
  "eslint": "^9",
@@ -72,5 +74,5 @@
72
74
  "peerDependencies": {
73
75
  "typescript": "^5.9.3"
74
76
  },
75
- "packageManager": "yarn@4.15.0"
77
+ "packageManager": "yarn@4.17.0"
76
78
  }
package/helpers/string.js DELETED
@@ -1,50 +0,0 @@
1
- /**
2
- * Adds a trailing slash to a URL if it doesn't already have one.
3
- */
4
- export function addTrailingSlash(url) {
5
- const trimmedURL = url.trim();
6
- if ('' === trimmedURL) {
7
- return url;
8
- }
9
- return normalizePath(url.replace(/\/?$/, '/'));
10
- }
11
- /**
12
- * Adds a leading slash to a URL if it doesn't already have one.
13
- */
14
- export function addLeadingSlash(url) {
15
- const trimmedURL = url.trim();
16
- if ('' === trimmedURL) {
17
- return url;
18
- }
19
- return normalizePath(url.replace(/^\/?/, '/'));
20
- }
21
- /**
22
- * Removes a leading slash from a URL if it has one.
23
- */
24
- export function removeLeadingSlash(url) {
25
- const trimmedURL = url.trim();
26
- if ('' === trimmedURL) {
27
- return url;
28
- }
29
- return normalizePath(url.replace(/^\//, ''));
30
- }
31
- /**
32
- * Removes a trailing slash from a URL if it has one.
33
- *
34
- */
35
- export function removeTrailingSlash(url) {
36
- const trimmedURL = url.trim();
37
- if ('' === trimmedURL) {
38
- return url;
39
- }
40
- return normalizePath(url.replace(/\/$/, ''));
41
- }
42
- /**
43
- * Normalize path separators by replacing backslashes with forward slashes.
44
- *
45
- * Replace Windows backslashes with forward slashes.
46
- */
47
- export function normalizePath(path) {
48
- return path.replace(/\\/g, '/');
49
- }
50
- //# sourceMappingURL=string.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"string.js","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAE,GAAW;IAC5C,MAAM,UAAU,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC9B,IAAK,EAAE,KAAK,UAAU,EAAG,CAAC;QACzB,OAAO,GAAG,CAAC;IACZ,CAAC;IACD,OAAO,aAAa,CAAE,GAAG,CAAC,OAAO,CAAE,MAAM,EAAE,GAAG,CAAE,CAAE,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAE,GAAW;IAC3C,MAAM,UAAU,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC9B,IAAK,EAAE,KAAK,UAAU,EAAG,CAAC;QACzB,OAAO,GAAG,CAAC;IACZ,CAAC;IACD,OAAO,aAAa,CAAE,GAAG,CAAC,OAAO,CAAE,MAAM,EAAE,GAAG,CAAE,CAAE,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAE,GAAW;IAC9C,MAAM,UAAU,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC9B,IAAK,EAAE,KAAK,UAAU,EAAG,CAAC;QACzB,OAAO,GAAG,CAAC;IACZ,CAAC;IACD,OAAO,aAAa,CAAE,GAAG,CAAC,OAAO,CAAE,KAAK,EAAE,EAAE,CAAE,CAAE,CAAC;AAClD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAE,GAAW;IAC/C,MAAM,UAAU,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC9B,IAAK,EAAE,KAAK,UAAU,EAAG,CAAC;QACzB,OAAO,GAAG,CAAC;IACZ,CAAC;IACD,OAAO,aAAa,CAAE,GAAG,CAAC,OAAO,CAAE,KAAK,EAAE,EAAE,CAAE,CAAE,CAAC;AAClD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAE,IAAY;IAC1C,OAAO,IAAI,CAAC,OAAO,CAAE,KAAK,EAAE,GAAG,CAAE,CAAC;AACnC,CAAC"}
package/helpers/string.ts DELETED
@@ -1,53 +0,0 @@
1
- /**
2
- * Adds a trailing slash to a URL if it doesn't already have one.
3
- */
4
- export function addTrailingSlash( url: string ): string {
5
- const trimmedURL = url.trim();
6
- if ( '' === trimmedURL ) {
7
- return url;
8
- }
9
- return normalizePath( url.replace( /\/?$/, '/' ) );
10
- }
11
-
12
- /**
13
- * Adds a leading slash to a URL if it doesn't already have one.
14
- */
15
- export function addLeadingSlash( url: string ): string {
16
- const trimmedURL = url.trim();
17
- if ( '' === trimmedURL ) {
18
- return url;
19
- }
20
- return normalizePath( url.replace( /^\/?/, '/' ) );
21
- }
22
-
23
- /**
24
- * Removes a leading slash from a URL if it has one.
25
- */
26
- export function removeLeadingSlash( url: string ): string {
27
- const trimmedURL = url.trim();
28
- if ( '' === trimmedURL ) {
29
- return url;
30
- }
31
- return normalizePath( url.replace( /^\//, '' ) );
32
- }
33
-
34
- /**
35
- * Removes a trailing slash from a URL if it has one.
36
- *
37
- */
38
- export function removeTrailingSlash( url: string ): string {
39
- const trimmedURL = url.trim();
40
- if ( '' === trimmedURL ) {
41
- return url;
42
- }
43
- return normalizePath( url.replace( /\/$/, '' ) );
44
- }
45
-
46
- /**
47
- * Normalize path separators by replacing backslashes with forward slashes.
48
- *
49
- * Replace Windows backslashes with forward slashes.
50
- */
51
- export function normalizePath( path: string ): string {
52
- return path.replace( /\\/g, '/' );
53
- }