@webdeveric/utils 0.30.0 → 0.31.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.
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPackageName = void 0;
4
+ function getPackageName(input) {
5
+ var _a, _b;
6
+ return (_b = (_a = input.match(/^(?<pkg>(?:(?<scope>@[^/]+)\/)?(?<name>[a-z][^/]+))/i)) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.pkg;
7
+ }
8
+ exports.getPackageName = getPackageName;
9
+ //# sourceMappingURL=getPackageName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPackageName.js","sourceRoot":"","sources":["../../src/getPackageName.ts"],"names":[],"mappings":";;;AAAA,SAAgB,cAAc,CAAC,KAAa;;IAC1C,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,sDAAsD,CAAC,0CAAE,MAAM,0CAAE,GAAG,CAAC;AAC1F,CAAC;AAFD,wCAEC"}
@@ -0,0 +1,4 @@
1
+ export function getPackageName(input) {
2
+ return input.match(/^(?<pkg>(?:(?<scope>@[^/]+)\/)?(?<name>[a-z][^/]+))/i)?.groups?.pkg;
3
+ }
4
+ //# sourceMappingURL=getPackageName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPackageName.js","sourceRoot":"","sources":["../../src/getPackageName.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,OAAO,KAAK,CAAC,KAAK,CAAC,sDAAsD,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC;AAC1F,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function getPackageName(input: string): string | undefined;
2
+ //# sourceMappingURL=getPackageName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPackageName.d.ts","sourceRoot":"","sources":["../../src/getPackageName.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEhE"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@webdeveric/utils",
3
3
  "description": "Just another collection of utilities.",
4
- "version": "0.30.0",
4
+ "version": "0.31.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -75,11 +75,11 @@
75
75
  "devDependencies": {
76
76
  "@types/lodash.clonedeep": "^4.5.9",
77
77
  "@types/lodash.escaperegexp": "^4.1.9",
78
- "@types/node": "^20.12.2",
79
- "@vitest/coverage-v8": "^1.4.0",
78
+ "@types/node": "^20.12.7",
79
+ "@vitest/coverage-v8": "^1.5.2",
80
80
  "@webdeveric/eslint-config-ts": "^0.7.1",
81
81
  "@webdeveric/prettier-config": "^0.2.0",
82
- "cspell": "^8.6.1",
82
+ "cspell": "^8.7.0",
83
83
  "eslint": "^8.57.0",
84
84
  "eslint-config-prettier": "^9.1.0",
85
85
  "eslint-import-resolver-typescript": "^3.6.1",
@@ -89,9 +89,9 @@
89
89
  "lint-staged": "^15.2.2",
90
90
  "prettier": "^3.2.5",
91
91
  "rimraf": "^5.0.5",
92
- "typescript": "^5.4.3",
92
+ "typescript": "^5.4.5",
93
93
  "validate-package-exports": "^0.2.1",
94
- "vitest": "^1.4.0"
94
+ "vitest": "^1.5.2"
95
95
  },
96
96
  "scripts": {
97
97
  "clean": "rimraf ./dist/",