@avatar-generator/core 1.0.0 → 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.
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export function getInitials(name) {
2
2
  return name
3
3
  .split(" ")
4
+ .slice(0, 2)
4
5
  .map((part) => part[0].toUpperCase())
5
6
  .join("");
6
7
  }
package/package.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "name": "@avatar-generator/core",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Core logic for avatar generation",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/index.d.ts",
7
- "scripts": {
8
- "build": "tsc",
9
- "prepublishOnly": "npm run build"
10
- },
11
7
  "publishConfig": {
12
8
  "access": "public"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc"
13
12
  }
14
- }
13
+ }
package/src/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export function getInitials(name: string): string {
2
2
  return name
3
3
  .split(" ")
4
+ .slice(0, 2)
4
5
  .map((part) => part[0].toUpperCase())
5
6
  .join("");
6
7
  }