@sohanemon/utils 4.0.1 → 4.0.2

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.
@@ -4,7 +4,8 @@ export function cn(...inputs) {
4
4
  return twMerge(clsx(inputs));
5
5
  }
6
6
  export function isNavActive(href, path) {
7
- return href === '/' ? path === '/' : path?.includes(href);
7
+ const regex = new RegExp(`^\/?${href}(\/|$)`);
8
+ return regex.test(path);
8
9
  }
9
10
  export function cleanSrc(src) {
10
11
  if (src.includes('/public/'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sohanemon/utils",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",