@dominik1905/string-toolkit 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,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/string-toolkit.iml" filepath="$PROJECT_DIR$/.idea/string-toolkit.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="WEB_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$" />
5
+ <orderEntry type="inheritedJdk" />
6
+ <orderEntry type="sourceFolder" forTests="false" />
7
+ </component>
8
+ </module>
package/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1 @@
1
+ # Contribution Guidelines
@@ -0,0 +1 @@
1
+ # Feature Request Template
@@ -0,0 +1 @@
1
+ # Issue Template
package/LICENSE.md ADDED
@@ -0,0 +1,7 @@
1
+
2
+ ```text
3
+ MIT License
4
+
5
+ Copyright (c) 2026 Dominik Eifinger
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files...
@@ -0,0 +1 @@
1
+ # Pull_Request_Template
package/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # String Toolkit
2
+
3
+ [cite_start]A small, useful JavaScript library that provides string manipulation functions.
4
+
5
+ ## Installation
6
+
7
+ [cite_start]You can install this package using npm or yarn:
8
+
9
+ **npm:**
10
+ npm install @dominik1905/string-toolkit
11
+
12
+ **yarn:**
13
+ yarn add @dominik1905/string-toolkit
14
+
15
+ ## Usage
16
+
17
+ [cite_start]Here are detailed examples of how to use the available functions.
18
+
19
+ ### toSnakeCase
20
+ [cite_start]Converts a string to snake_case (lowercase words separated by underscores)[cite: 9].
21
+
22
+ ```javascript
23
+ const { toSnakeCase } = require('@dominik1905/string-toolkit');
24
+
25
+ const result = toSnakeCase("Hello World");
26
+ console.log(result); [cite_start]// Output: "hello_world" [cite: 9, 10]
package/SECURITY.md ADDED
@@ -0,0 +1 @@
1
+ # Security Policy
package/index.js ADDED
@@ -0,0 +1,11 @@
1
+
2
+ function toSnakeCase(str) {
3
+ if (!str) return '';
4
+ // Wandelt alles in Kleinbuchstaben um und ersetzt Leerzeichen durch Unterstriche
5
+ return str.toLowerCase().split(' ').join('_');
6
+ }
7
+
8
+ // Damit die Funktion von anderen Dateien (und unseren Tests) genutzt werden kann:
9
+ module.exports = {
10
+ toSnakeCase
11
+ };
package/index.test.js ADDED
@@ -0,0 +1,5 @@
1
+ const { toSnakeCase } = require('./index');
2
+
3
+ test('converts "Hello World" to "hello_world"', () => {
4
+ expect(toSnakeCase('Hello World')).toBe('hello_world');
5
+ });
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@dominik1905/string-toolkit",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "license": "ISC",
6
+ "author": "",
7
+ "type": "commonjs",
8
+ "main": "index.js",
9
+ "scripts": {
10
+ "test": "jest"
11
+ },
12
+ "devDependencies": {
13
+ "jest": "^30.3.0"
14
+ }
15
+ }