@pcmunoz/capitalize-first-letter 1.0.1

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,20 @@
1
+ name: Manual publish to npm
2
+
3
+ on: workflow_dispatch
4
+
5
+ jobs:
6
+ publish:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v4
10
+
11
+ - name: Setup Node.js
12
+ uses: actions/setup-node@v4
13
+ with:
14
+ node-version: "20"
15
+ registry-url: "https://registry.npmjs.org"
16
+
17
+ - name: Publish to npm
18
+ run: npm publish --access public
19
+ env:
20
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,23 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Setup Node.js
15
+ uses: actions/setup-node@v4
16
+ with:
17
+ node-version: "20"
18
+ registry-url: "https://registry.npmjs.org"
19
+
20
+ - name: Publish to npm
21
+ run: npm publish
22
+ env:
23
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Patrick Ceasar Muñoz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # capitalize-first-letter
2
+
3
+ Capital First Letter
4
+
5
+ Only capitalize first letter. No cleaning up of whitespaces
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare function capitalizeFirstLetter(str: string): string;
package/index.js ADDED
@@ -0,0 +1,6 @@
1
+ export function capitalizeFirstLetter(str) {
2
+ if (typeof str !== "string") {
3
+ throw Error("function expects a string argument");
4
+ }
5
+ return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
6
+ }
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@pcmunoz/capitalize-first-letter",
3
+ "version": "1.0.1",
4
+ "description": "Only capitalize first letter. No cleaning up of whitespaces",
5
+ "keywords": [
6
+ "capitalize",
7
+ "javascript"
8
+ ],
9
+ "homepage": "https://github.com/pcmunoz/capitalize-first-letter#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/pcmunoz/capitalize-first-letter/issues"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/pcmunoz/capitalize-first-letter.git"
16
+ },
17
+ "license": "MIT",
18
+ "author": "Patrick Ceasar Muñoz",
19
+ "type": "module",
20
+ "main": "index.js",
21
+ "access": "public"
22
+ }