@aparinay-test-1/utils 1.0.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,5 @@
1
+ /**
2
+ * Slugifies a string — converts it to lowercase, replaces spaces and
3
+ * non-alphanumeric characters with hyphens, and trims leading/trailing hyphens.
4
+ */
5
+ export declare function slugify(text: string): string;
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.slugify = slugify;
4
+ /**
5
+ * Slugifies a string — converts it to lowercase, replaces spaces and
6
+ * non-alphanumeric characters with hyphens, and trims leading/trailing hyphens.
7
+ */
8
+ function slugify(text) {
9
+ return text
10
+ .toLowerCase()
11
+ .trim()
12
+ .replace(/[^a-z0-9]+/g, "-")
13
+ .replace(/^-+|-+$/g, "");
14
+ }
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@aparinay-test-1/utils",
3
+ "version": "1.0.0",
4
+ "description": "A simple utility library",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "prepublishOnly": "npm run build"
13
+ },
14
+ "engines": {
15
+ "node": ">=20"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "license": "MIT",
21
+ "devDependencies": {
22
+ "typescript": "^6.0.2"
23
+ }
24
+ }