diff --git a/package.json b/package.json index b781349..00fc7ed 100755 --- a/package.json +++ b/package.json @@ -6,8 +6,6 @@ "type": "git", "url": "git://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#.git" }, - "main": "dist/index.js", - "types": "dist/index.d.ts", "scripts": { "test": "echo DODO", "build": "tsc", @@ -18,6 +16,13 @@ "format:check": "npm run _format -- --list-different", "link-in-app": "ts-node --skipProject scripts/link-in-app.ts" }, + "main": "dist/index.js", + "types": "dist/index.d.ts", + "exports": { + ".": "./dist/index.js", + "./*": "./dist/*.js", + "./tools": "./dist/tools/index.js" + }, "lint-staged": { "*.{ts,tsx}": [ "eslint --fix" diff --git a/src/tools/capitalize.ts b/src/tools/capitalize.ts new file mode 100644 index 0000000..8c61b4b --- /dev/null +++ b/src/tools/capitalize.ts @@ -0,0 +1,5 @@ +/** @see */ +export function capitalize(str: S): Capitalize { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return (str.charAt(0).toUpperCase() + str.slice(1)) as any; +} \ No newline at end of file diff --git a/src/tools/index.ts b/src/tools/index.ts new file mode 100644 index 0000000..a97f230 --- /dev/null +++ b/src/tools/index.ts @@ -0,0 +1 @@ +export * from "./capitalize"; \ No newline at end of file