From ebe0b23c8b69970d9bc4d6bbdc1c390eea612e37 Mon Sep 17 00:00:00 2001 From: Ram-Amoncar Date: Sun, 25 May 2025 00:30:12 +0530 Subject: [PATCH 1/7] chore: dev-deps updated --- package-lock.json | 1159 ++++++++++----------------------------------- 1 file changed, 262 insertions(+), 897 deletions(-) diff --git a/package-lock.json b/package-lock.json index 73a7e20..88a6b30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1098,9 +1098,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.13.0.tgz", - "integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", + "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", "dev": true, "license": "Apache-2.0", "peer": true, @@ -1163,14 +1163,17 @@ } }, "node_modules/@eslint/js": { - "version": "9.26.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.26.0.tgz", - "integrity": "sha512-I9XlJawFdSMvWjDt6wksMCrgns5ggLNfFwFvnShsleWruvXM514Qxk8V246efTw+eo9JABvVz+u3q2RiAowKxQ==", + "version": "9.27.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.27.0.tgz", + "integrity": "sha512-G5JD9Tu5HJEu4z2Uo4aHY2sLV64B7CDMXxFzqzjl3NKd6RVzSXNoE80jk7Y0lJkTTkjiIhBAqmlYwjuBY3tvpA==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" } }, "node_modules/@eslint/object-schema": { @@ -1185,14 +1188,14 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz", - "integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz", + "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==", "dev": true, "license": "Apache-2.0", "peer": true, "dependencies": { - "@eslint/core": "^0.13.0", + "@eslint/core": "^0.14.0", "levn": "^0.4.1" }, "engines": { @@ -1835,29 +1838,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@modelcontextprotocol/sdk": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.11.1.tgz", - "integrity": "sha512-9LfmxKTb1v+vUS1/emSk1f5ePmTLkb9Le9AxOB5T0XM59EUumwcS45z05h7aiZx3GI0Bl7mjb3FMEglYj+acuQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "content-type": "^1.0.5", - "cors": "^2.8.5", - "cross-spawn": "^7.0.3", - "eventsource": "^3.0.2", - "express": "^5.0.1", - "express-rate-limit": "^7.5.0", - "pkce-challenge": "^5.0.0", - "raw-body": "^3.0.0", - "zod": "^3.23.8", - "zod-to-json-schema": "^3.24.1" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1921,9 +1901,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.2.tgz", - "integrity": "sha512-JkdNEq+DFxZfUwxvB58tHMHBHVgX23ew41g1OQinthJ+ryhdRk67O31S7sYw8u2lTjHUPFxwar07BBt1KHp/hg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.0.tgz", + "integrity": "sha512-KxN+zCjOYHGwCl4UCtSfZ6jrq/qi88JDUtiEFk8LELEHq2Egfc/FgW+jItZiOLRuQfb/3xJSgFuNPC9jzggX+A==", "cpu": [ "arm" ], @@ -1935,9 +1915,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.40.2.tgz", - "integrity": "sha512-13unNoZ8NzUmnndhPTkWPWbX3vtHodYmy+I9kuLxN+F+l+x3LdVF7UCu8TWVMt1POHLh6oDHhnOA04n8oJZhBw==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.0.tgz", + "integrity": "sha512-yDvqx3lWlcugozax3DItKJI5j05B0d4Kvnjx+5mwiUpWramVvmAByYigMplaoAQ3pvdprGCTCE03eduqE/8mPQ==", "cpu": [ "arm64" ], @@ -1949,9 +1929,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.40.2.tgz", - "integrity": "sha512-Gzf1Hn2Aoe8VZzevHostPX23U7N5+4D36WJNHK88NZHCJr7aVMG4fadqkIf72eqVPGjGc0HJHNuUaUcxiR+N/w==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.0.tgz", + "integrity": "sha512-2KOU574vD3gzcPSjxO0eyR5iWlnxxtmW1F5CkNOHmMlueKNCQkxR6+ekgWyVnz6zaZihpUNkGxjsYrkTJKhkaw==", "cpu": [ "arm64" ], @@ -1963,9 +1943,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.40.2.tgz", - "integrity": "sha512-47N4hxa01a4x6XnJoskMKTS8XZ0CZMd8YTbINbi+w03A2w4j1RTlnGHOz/P0+Bg1LaVL6ufZyNprSg+fW5nYQQ==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.0.tgz", + "integrity": "sha512-gE5ACNSxHcEZyP2BA9TuTakfZvULEW4YAOtxl/A/YDbIir/wPKukde0BNPlnBiP88ecaN4BJI2TtAd+HKuZPQQ==", "cpu": [ "x64" ], @@ -1977,9 +1957,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.40.2.tgz", - "integrity": "sha512-8t6aL4MD+rXSHHZUR1z19+9OFJ2rl1wGKvckN47XFRVO+QL/dUSpKA2SLRo4vMg7ELA8pzGpC+W9OEd1Z/ZqoQ==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.0.tgz", + "integrity": "sha512-GSxU6r5HnWij7FoSo7cZg3l5GPg4HFLkzsFFh0N/b16q5buW1NAWuCJ+HMtIdUEi6XF0qH+hN0TEd78laRp7Dg==", "cpu": [ "arm64" ], @@ -1991,9 +1971,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.40.2.tgz", - "integrity": "sha512-C+AyHBzfpsOEYRFjztcYUFsH4S7UsE9cDtHCtma5BK8+ydOZYgMmWg1d/4KBytQspJCld8ZIujFMAdKG1xyr4Q==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.0.tgz", + "integrity": "sha512-KGiGKGDg8qLRyOWmk6IeiHJzsN/OYxO6nSbT0Vj4MwjS2XQy/5emsmtoqLAabqrohbgLWJ5GV3s/ljdrIr8Qjg==", "cpu": [ "x64" ], @@ -2005,9 +1985,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.40.2.tgz", - "integrity": "sha512-de6TFZYIvJwRNjmW3+gaXiZ2DaWL5D5yGmSYzkdzjBDS3W+B9JQ48oZEsmMvemqjtAFzE16DIBLqd6IQQRuG9Q==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.0.tgz", + "integrity": "sha512-46OzWeqEVQyX3N2/QdiU/CMXYDH/lSHpgfBkuhl3igpZiaB3ZIfSjKuOnybFVBQzjsLwkus2mjaESy8H41SzvA==", "cpu": [ "arm" ], @@ -2019,9 +1999,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.40.2.tgz", - "integrity": "sha512-urjaEZubdIkacKc930hUDOfQPysezKla/O9qV+O89enqsqUmQm8Xj8O/vh0gHg4LYfv7Y7UsE3QjzLQzDYN1qg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.0.tgz", + "integrity": "sha512-lfgW3KtQP4YauqdPpcUZHPcqQXmTmH4nYU0cplNeW583CMkAGjtImw4PKli09NFi2iQgChk4e9erkwlfYem6Lg==", "cpu": [ "arm" ], @@ -2033,9 +2013,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.40.2.tgz", - "integrity": "sha512-KlE8IC0HFOC33taNt1zR8qNlBYHj31qGT1UqWqtvR/+NuCVhfufAq9fxO8BMFC22Wu0rxOwGVWxtCMvZVLmhQg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.0.tgz", + "integrity": "sha512-nn8mEyzMbdEJzT7cwxgObuwviMx6kPRxzYiOl6o/o+ChQq23gfdlZcUNnt89lPhhz3BYsZ72rp0rxNqBSfqlqw==", "cpu": [ "arm64" ], @@ -2047,9 +2027,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.40.2.tgz", - "integrity": "sha512-j8CgxvfM0kbnhu4XgjnCWJQyyBOeBI1Zq91Z850aUddUmPeQvuAy6OiMdPS46gNFgy8gN1xkYyLgwLYZG3rBOg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.0.tgz", + "integrity": "sha512-l+QK99je2zUKGd31Gh+45c4pGDAqZSuWQiuRFCdHYC2CSiO47qUWsCcenrI6p22hvHZrDje9QjwSMAFL3iwXwQ==", "cpu": [ "arm64" ], @@ -2061,9 +2041,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.40.2.tgz", - "integrity": "sha512-Ybc/1qUampKuRF4tQXc7G7QY9YRyeVSykfK36Y5Qc5dmrIxwFhrOzqaVTNoZygqZ1ZieSWTibfFhQ5qK8jpWxw==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.0.tgz", + "integrity": "sha512-WbnJaxPv1gPIm6S8O/Wg+wfE/OzGSXlBMbOe4ie+zMyykMOeqmgD1BhPxZQuDqwUN+0T/xOFtL2RUWBspnZj3w==", "cpu": [ "loong64" ], @@ -2075,9 +2055,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.40.2.tgz", - "integrity": "sha512-3FCIrnrt03CCsZqSYAOW/k9n625pjpuMzVfeI+ZBUSDT3MVIFDSPfSUgIl9FqUftxcUXInvFah79hE1c9abD+Q==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.0.tgz", + "integrity": "sha512-eRDWR5t67/b2g8Q/S8XPi0YdbKcCs4WQ8vklNnUYLaSWF+Cbv2axZsp4jni6/j7eKvMLYCYdcsv8dcU+a6QNFg==", "cpu": [ "ppc64" ], @@ -2089,9 +2069,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.40.2.tgz", - "integrity": "sha512-QNU7BFHEvHMp2ESSY3SozIkBPaPBDTsfVNGx3Xhv+TdvWXFGOSH2NJvhD1zKAT6AyuuErJgbdvaJhYVhVqrWTg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.0.tgz", + "integrity": "sha512-TWrZb6GF5jsEKG7T1IHwlLMDRy2f3DPqYldmIhnA2DVqvvhY2Ai184vZGgahRrg8k9UBWoSlHv+suRfTN7Ua4A==", "cpu": [ "riscv64" ], @@ -2103,9 +2083,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.40.2.tgz", - "integrity": "sha512-5W6vNYkhgfh7URiXTO1E9a0cy4fSgfE4+Hl5agb/U1sa0kjOLMLC1wObxwKxecE17j0URxuTrYZZME4/VH57Hg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.0.tgz", + "integrity": "sha512-ieQljaZKuJpmWvd8gW87ZmSFwid6AxMDk5bhONJ57U8zT77zpZ/TPKkU9HpnnFrM4zsgr4kiGuzbIbZTGi7u9A==", "cpu": [ "riscv64" ], @@ -2117,9 +2097,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.40.2.tgz", - "integrity": "sha512-B7LKIz+0+p348JoAL4X/YxGx9zOx3sR+o6Hj15Y3aaApNfAshK8+mWZEf759DXfRLeL2vg5LYJBB7DdcleYCoQ==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.0.tgz", + "integrity": "sha512-/L3pW48SxrWAlVsKCN0dGLB2bi8Nv8pr5S5ocSM+S0XCn5RCVCXqi8GVtHFsOBBCSeR+u9brV2zno5+mg3S4Aw==", "cpu": [ "s390x" ], @@ -2131,9 +2111,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.2.tgz", - "integrity": "sha512-lG7Xa+BmBNwpjmVUbmyKxdQJ3Q6whHjMjzQplOs5Z+Gj7mxPtWakGHqzMqNER68G67kmCX9qX57aRsW5V0VOng==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.0.tgz", + "integrity": "sha512-XMLeKjyH8NsEDCRptf6LO8lJk23o9wvB+dJwcXMaH6ZQbbkHu2dbGIUindbMtRN6ux1xKi16iXWu6q9mu7gDhQ==", "cpu": [ "x64" ], @@ -2145,9 +2125,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.2.tgz", - "integrity": "sha512-tD46wKHd+KJvsmije4bUskNuvWKFcTOIM9tZ/RrmIvcXnbi0YK/cKS9FzFtAm7Oxi2EhV5N2OpfFB348vSQRXA==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.0.tgz", + "integrity": "sha512-m/P7LycHZTvSQeXhFmgmdqEiTqSV80zn6xHaQ1JSqwCtD1YGtwEK515Qmy9DcB2HK4dOUVypQxvhVSy06cJPEg==", "cpu": [ "x64" ], @@ -2159,9 +2139,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.2.tgz", - "integrity": "sha512-Bjv/HG8RRWLNkXwQQemdsWw4Mg+IJ29LK+bJPW2SCzPKOUaMmPEppQlu/Fqk1d7+DX3V7JbFdbkh/NMmurT6Pg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.0.tgz", + "integrity": "sha512-4yodtcOrFHpbomJGVEqZ8fzD4kfBeCbpsUy5Pqk4RluXOdsWdjLnjhiKy2w3qzcASWd04fp52Xz7JKarVJ5BTg==", "cpu": [ "arm64" ], @@ -2173,9 +2153,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.2.tgz", - "integrity": "sha512-dt1llVSGEsGKvzeIO76HToiYPNPYPkmjhMHhP00T9S4rDern8P2ZWvWAQUEJ+R1UdMWJ/42i/QqJ2WV765GZcA==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.0.tgz", + "integrity": "sha512-tmazCrAsKzdkXssEc65zIE1oC6xPHwfy9d5Ta25SRCDOZS+I6RypVVShWALNuU9bxIfGA0aqrmzlzoM5wO5SPQ==", "cpu": [ "ia32" ], @@ -2187,9 +2167,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.2.tgz", - "integrity": "sha512-bwspbWB04XJpeElvsp+DCylKfF4trJDa2Y9Go8O6A7YLX2LIKGcNK/CYImJN6ZP4DcuOHB4Utl3iCbnR62DudA==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.0.tgz", + "integrity": "sha512-h1J+Yzjo/X+0EAvR2kIXJDuTuyT7drc+t2ALY0nIcGPbTatNOf0VWdhEA2Z4AAjv6X1NJV7SYo5oCTYRJhSlVA==", "cpu": [ "x64" ], @@ -2398,9 +2378,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.15.17", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.17.tgz", - "integrity": "sha512-wIX2aSZL5FE+MR0JlvF87BNVrtFWf6AE6rxSE9X7OwnVvoyCQjpzSRJ+M87se/4QCkCiebQAqrJ0y6fwIyi7nw==", + "version": "22.15.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.21.tgz", + "integrity": "sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2432,19 +2412,19 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.32.0.tgz", - "integrity": "sha512-/jU9ettcntkBFmWUzzGgsClEi2ZFiikMX5eEQsmxIAWMOn4H3D4rvHssstmAHGVvrYnaMqdWWWg0b5M6IN/MTQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.32.1.tgz", + "integrity": "sha512-6u6Plg9nP/J1GRpe/vcjjabo6Uc5YQPAMxsgQyGC/I0RuukiG1wIe3+Vtg3IrSCVJDmqK3j8adrtzXSENRtFgg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.32.0", - "@typescript-eslint/type-utils": "8.32.0", - "@typescript-eslint/utils": "8.32.0", - "@typescript-eslint/visitor-keys": "8.32.0", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/type-utils": "8.32.1", + "@typescript-eslint/utils": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "graphemer": "^1.4.0", - "ignore": "^5.3.1", + "ignore": "^7.0.0", "natural-compare": "^1.4.0", "ts-api-utils": "^2.1.0" }, @@ -2461,17 +2441,27 @@ "typescript": ">=4.8.4 <5.9.0" } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz", + "integrity": "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/@typescript-eslint/parser": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.32.0.tgz", - "integrity": "sha512-B2MdzyWxCE2+SqiZHAjPphft+/2x2FlO9YBx7eKE1BCb+rqBlQdhtAEhzIEdozHd55DXPmxBdpMygFJjfjjA9A==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.32.1.tgz", + "integrity": "sha512-LKMrmwCPoLhM45Z00O1ulb6jwyVr2kr3XJp+G+tSEZcbauNnScewcQwtJqXDhXeYPDEjZ8C1SjXm015CirEmGg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.32.0", - "@typescript-eslint/types": "8.32.0", - "@typescript-eslint/typescript-estree": "8.32.0", - "@typescript-eslint/visitor-keys": "8.32.0", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/typescript-estree": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "debug": "^4.3.4" }, "engines": { @@ -2487,14 +2477,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.32.0.tgz", - "integrity": "sha512-jc/4IxGNedXkmG4mx4nJTILb6TMjL66D41vyeaPWvDUmeYQzF3lKtN15WsAeTr65ce4mPxwopPSo1yUUAWw0hQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.32.1.tgz", + "integrity": "sha512-7IsIaIDeZn7kffk7qXC3o6Z4UblZJKV3UBpkvRNpr5NSyLji7tvTcvmnMNYuYLyh26mN8W723xpo3i4MlD33vA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.0", - "@typescript-eslint/visitor-keys": "8.32.0" + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2505,14 +2495,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.32.0.tgz", - "integrity": "sha512-t2vouuYQKEKSLtJaa5bB4jHeha2HJczQ6E5IXPDPgIty9EqcJxpr1QHQ86YyIPwDwxvUmLfP2YADQ5ZY4qddZg==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.32.1.tgz", + "integrity": "sha512-mv9YpQGA8iIsl5KyUPi+FGLm7+bA4fgXaeRcFKRDRwDMu4iwrSHeDPipwueNXhdIIZltwCJv+NkxftECbIZWfA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.32.0", - "@typescript-eslint/utils": "8.32.0", + "@typescript-eslint/typescript-estree": "8.32.1", + "@typescript-eslint/utils": "8.32.1", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -2529,9 +2519,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.32.0.tgz", - "integrity": "sha512-O5Id6tGadAZEMThM6L9HmVf5hQUXNSxLVKeGJYWNhhVseps/0LddMkp7//VDkzwJ69lPL0UmZdcZwggj9akJaA==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.32.1.tgz", + "integrity": "sha512-YmybwXUJcgGqgAp6bEsgpPXEg6dcCyPyCSr0CAAueacR/CCBi25G3V8gGQ2kRzQRBNol7VQknxMs9HvVa9Rvfg==", "dev": true, "license": "MIT", "engines": { @@ -2543,14 +2533,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.32.0.tgz", - "integrity": "sha512-pU9VD7anSCOIoBFnhTGfOzlVFQIA1XXiQpH/CezqOBaDppRwTglJzCC6fUQGpfwey4T183NKhF1/mfatYmjRqQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.32.1.tgz", + "integrity": "sha512-Y3AP9EIfYwBb4kWGb+simvPaqQoT5oJuzzj9m0i6FCY6SPvlomY2Ei4UEMm7+FXtlNJbor80ximyslzaQF6xhg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.0", - "@typescript-eslint/visitor-keys": "8.32.0", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2570,16 +2560,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.32.0.tgz", - "integrity": "sha512-8S9hXau6nQ/sYVtC3D6ISIDoJzS1NsCK+gluVhLN2YkBPX+/1wkwyUiDKnxRh15579WoOIyVWnoyIf3yGI9REw==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.32.1.tgz", + "integrity": "sha512-DsSFNIgLSrc89gpq1LJB7Hm1YpuhK086DRDJSNrewcGvYloWW1vZLHBTIvarKZDcAORIy/uWNx8Gad+4oMpkSA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.32.0", - "@typescript-eslint/types": "8.32.0", - "@typescript-eslint/typescript-estree": "8.32.0" + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/typescript-estree": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2594,13 +2584,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.32.0.tgz", - "integrity": "sha512-1rYQTCLFFzOI5Nl0c8LUpJT8HxpwVRn9E4CkMsYfuN6ctmQqExjSTzzSk0Tz2apmXy7WU6/6fyaZVVA/thPN+w==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.32.1.tgz", + "integrity": "sha512-ar0tjQfObzhSaW3C3QNmTc5ofj0hDoNQ5XWrCy6zDyabdr0TWhCkClp+rywGNj/odAFBVzzJrK4tEq5M4Hmu4w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.0", + "@typescript-eslint/types": "8.32.1", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -2611,21 +2601,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/accepts": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", - "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "mime-types": "^3.0.0", - "negotiator": "^1.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/acorn": { "version": "8.14.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", @@ -3057,28 +3032,6 @@ "dev": true, "license": "MIT" }, - "node_modules/body-parser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz", - "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "bytes": "^3.1.2", - "content-type": "^1.0.5", - "debug": "^4.4.0", - "http-errors": "^2.0.0", - "iconv-lite": "^0.6.3", - "on-finished": "^2.4.1", - "qs": "^6.14.0", - "raw-body": "^3.0.0", - "type-is": "^2.0.0" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -3181,17 +3134,6 @@ "esbuild": ">=0.18" } }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -3273,9 +3215,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001717", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001717.tgz", - "integrity": "sha512-auPpttCq6BDEG8ZAuHJIplGw6GODhjw+/11e7IjpnYCxZcW/ONgPs0KVBJ0d1bY3e2+7PRe5RCLyP+PfwVgkYw==", + "version": "1.0.30001718", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001718.tgz", + "integrity": "sha512-AflseV1ahcSunK53NfEs9gFWgOEmzr0f+kaMFA4xiLZlr9Hzt7HxcSpIFcnNCUkz6R6dWKa54rUz3HUmI3nVcw==", "dev": true, "funding": [ { @@ -3429,6 +3371,13 @@ "dev": true, "license": "MIT" }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true, + "license": "MIT" + }, "node_modules/consola": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", @@ -3439,31 +3388,6 @@ "node": "^14.18.0 || >=16.10.0" } }, - "node_modules/content-disposition": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", - "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -3471,43 +3395,6 @@ "dev": true, "license": "MIT" }, - "node_modules/cookie": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", - "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6.6.0" - } - }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/create-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", @@ -3607,9 +3494,9 @@ } }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3693,17 +3580,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -3769,14 +3645,6 @@ "dev": true, "license": "MIT" }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/ejs": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", @@ -3794,9 +3662,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.151", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.151.tgz", - "integrity": "sha512-Rl6uugut2l9sLojjS4H4SAr3A4IgACMLgpuEMPYCVcKydzfyPrn5absNRju38IhQOf/NwjJY8OGWjlteqYeBCA==", + "version": "1.5.155", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.155.tgz", + "integrity": "sha512-ps5KcGGmwL8VaeJlvlDlu4fORQpv3+GIcF5I3f9tUKUlJ/wsysh6HU8P5L1XWRYeXfA0oJd4PyM8ds8zTFf6Ng==", "dev": true, "license": "ISC" }, @@ -3820,17 +3688,6 @@ "dev": true, "license": "MIT" }, - "node_modules/encodeurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", - "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/enhanced-resolve": { "version": "5.18.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", @@ -4052,14 +3909,6 @@ "node": ">=6" } }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -4075,9 +3924,9 @@ } }, "node_modules/eslint": { - "version": "9.26.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.26.0.tgz", - "integrity": "sha512-Hx0MOjPh6uK9oq9nVsATZKE/Wlbai7KFjfCuw9UHaguDW3x+HF0O5nIi3ud39TWgrTjTO5nHxmL3R1eANinWHQ==", + "version": "9.27.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.27.0.tgz", + "integrity": "sha512-ixRawFQuMB9DZ7fjU3iGGganFDp3+45bPOdaRurcFHSXO1e/sYwUX/FtQZpLZJR6SjMoJH8hR2pPEAfDyCoU2Q==", "dev": true, "license": "MIT", "peer": true, @@ -4086,14 +3935,13 @@ "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.20.0", "@eslint/config-helpers": "^0.2.1", - "@eslint/core": "^0.13.0", + "@eslint/core": "^0.14.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.26.0", - "@eslint/plugin-kit": "^0.2.8", + "@eslint/js": "9.27.0", + "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", - "@modelcontextprotocol/sdk": "^1.8.0", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", @@ -4117,8 +3965,7 @@ "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "zod": "^3.24.2" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" @@ -4628,42 +4475,6 @@ "node": ">=0.10.0" } }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/eventsource": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", - "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "eventsource-parser": "^3.0.1" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/eventsource-parser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.1.tgz", - "integrity": "sha512-VARTJ9CYeuQYb0pZEPbzi740OWFgpHe7AYJ2WFZVnUDUQp5Dk2yJUgF36YsZ81cOyxT0QxmXD2EQpapAouzWVA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -4714,67 +4525,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/express": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz", - "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "accepts": "^2.0.0", - "body-parser": "^2.2.0", - "content-disposition": "^1.0.0", - "content-type": "^1.0.5", - "cookie": "^0.7.1", - "cookie-signature": "^1.2.1", - "debug": "^4.4.0", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "etag": "^1.8.1", - "finalhandler": "^2.1.0", - "fresh": "^2.0.0", - "http-errors": "^2.0.0", - "merge-descriptors": "^2.0.0", - "mime-types": "^3.0.0", - "on-finished": "^2.4.1", - "once": "^1.4.0", - "parseurl": "^1.3.3", - "proxy-addr": "^2.0.7", - "qs": "^6.14.0", - "range-parser": "^1.2.1", - "router": "^2.2.0", - "send": "^1.1.0", - "serve-static": "^2.2.0", - "statuses": "^2.0.1", - "type-is": "^2.0.1", - "vary": "^1.1.2" - }, - "engines": { - "node": ">= 18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/express-rate-limit": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.0.tgz", - "integrity": "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://github.com/sponsors/express-rate-limit" - }, - "peerDependencies": { - "express": "^4.11 || 5 || ^5.0.0-beta.1" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4920,25 +4670,6 @@ "node": ">=8" } }, - "node_modules/finalhandler": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", - "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "debug": "^4.4.0", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "on-finished": "^2.4.1", - "parseurl": "^1.3.3", - "statuses": "^2.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -4957,6 +4688,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/fix-dts-default-cjs-exports": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz", + "integrity": "sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "rollup": "^4.34.8" + } + }, "node_modules/flat-cache": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", @@ -5026,28 +4769,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", - "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -5212,9 +4933,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.0.tgz", - "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", + "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5443,24 +5164,6 @@ "dev": true, "license": "MIT" }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -5487,20 +5190,6 @@ "url": "https://github.com/sponsors/typicode" } }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -5593,17 +5282,6 @@ "node": ">= 0.4" } }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/is-array-buffer": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", @@ -5864,14 +5542,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-promise": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", - "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/is-regex": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", @@ -6983,6 +6653,16 @@ "yallist": "^3.0.2" } }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, "node_modules/make-dir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", @@ -7026,31 +6706,6 @@ "node": ">= 0.4" } }, - "node_modules/media-typer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", - "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/merge-descriptors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", - "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -7095,31 +6750,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", - "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -7166,6 +6796,19 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/mlly": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz", + "integrity": "sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.14.0", + "pathe": "^2.0.1", + "pkg-types": "^1.3.0", + "ufo": "^1.5.4" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -7192,17 +6835,6 @@ "dev": true, "license": "MIT" }, - "node_modules/negotiator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", - "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -7347,20 +6979,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -7507,17 +7125,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -7579,16 +7186,12 @@ "dev": true, "license": "ISC" }, - "node_modules/path-to-regexp": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", - "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=16" - } + "license": "MIT" }, "node_modules/picocolors": { "version": "1.1.1", @@ -7620,17 +7223,6 @@ "node": ">= 6" } }, - "node_modules/pkce-challenge": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.0.tgz", - "integrity": "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=16.20.0" - } - }, "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -7700,6 +7292,18 @@ "node": ">=8" } }, + "node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" + } + }, "node_modules/possible-typed-array-names": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", @@ -7836,21 +7440,6 @@ "node": ">= 6" } }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -7878,23 +7467,6 @@ ], "license": "MIT" }, - "node_modules/qs": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "dependencies": { - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -7916,34 +7488,6 @@ ], "license": "MIT" }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", - "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.6.3", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/react-is": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", @@ -8106,9 +7650,9 @@ } }, "node_modules/rollup": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.2.tgz", - "integrity": "sha512-tfUOg6DTP4rhQ3VjOO6B4wyrJnGOX85requAXvqYTHsOgb2TFJdZ3aWpT8W2kPoypSGP7dZUyzxJ9ee4buM5Fg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.0.tgz", + "integrity": "sha512-HqMFpUbWlf/tvcxBFNKnJyzc7Lk+XO3FGc3pbNBLqEbOz0gPLRgcrlS3UF4MfUrVlstOaP/q0kM6GVvi+LrLRg==", "dev": true, "license": "MIT", "dependencies": { @@ -8122,47 +7666,29 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.40.2", - "@rollup/rollup-android-arm64": "4.40.2", - "@rollup/rollup-darwin-arm64": "4.40.2", - "@rollup/rollup-darwin-x64": "4.40.2", - "@rollup/rollup-freebsd-arm64": "4.40.2", - "@rollup/rollup-freebsd-x64": "4.40.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.40.2", - "@rollup/rollup-linux-arm-musleabihf": "4.40.2", - "@rollup/rollup-linux-arm64-gnu": "4.40.2", - "@rollup/rollup-linux-arm64-musl": "4.40.2", - "@rollup/rollup-linux-loongarch64-gnu": "4.40.2", - "@rollup/rollup-linux-powerpc64le-gnu": "4.40.2", - "@rollup/rollup-linux-riscv64-gnu": "4.40.2", - "@rollup/rollup-linux-riscv64-musl": "4.40.2", - "@rollup/rollup-linux-s390x-gnu": "4.40.2", - "@rollup/rollup-linux-x64-gnu": "4.40.2", - "@rollup/rollup-linux-x64-musl": "4.40.2", - "@rollup/rollup-win32-arm64-msvc": "4.40.2", - "@rollup/rollup-win32-ia32-msvc": "4.40.2", - "@rollup/rollup-win32-x64-msvc": "4.40.2", + "@rollup/rollup-android-arm-eabi": "4.41.0", + "@rollup/rollup-android-arm64": "4.41.0", + "@rollup/rollup-darwin-arm64": "4.41.0", + "@rollup/rollup-darwin-x64": "4.41.0", + "@rollup/rollup-freebsd-arm64": "4.41.0", + "@rollup/rollup-freebsd-x64": "4.41.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.41.0", + "@rollup/rollup-linux-arm-musleabihf": "4.41.0", + "@rollup/rollup-linux-arm64-gnu": "4.41.0", + "@rollup/rollup-linux-arm64-musl": "4.41.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.41.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.41.0", + "@rollup/rollup-linux-riscv64-gnu": "4.41.0", + "@rollup/rollup-linux-riscv64-musl": "4.41.0", + "@rollup/rollup-linux-s390x-gnu": "4.41.0", + "@rollup/rollup-linux-x64-gnu": "4.41.0", + "@rollup/rollup-linux-x64-musl": "4.41.0", + "@rollup/rollup-win32-arm64-msvc": "4.41.0", + "@rollup/rollup-win32-ia32-msvc": "4.41.0", + "@rollup/rollup-win32-x64-msvc": "4.41.0", "fsevents": "~2.3.2" } }, - "node_modules/router": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", - "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "debug": "^4.4.0", - "depd": "^2.0.0", - "is-promise": "^4.0.0", - "parseurl": "^1.3.3", - "path-to-regexp": "^8.0.0" - }, - "engines": { - "node": ">= 18" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -8207,28 +7733,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "peer": true - }, "node_modules/safe-push-apply": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", @@ -8264,18 +7768,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -8285,47 +7781,6 @@ "node": ">=10" } }, - "node_modules/send": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", - "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "debug": "^4.3.5", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "etag": "^1.8.1", - "fresh": "^2.0.0", - "http-errors": "^2.0.0", - "mime-types": "^3.0.1", - "ms": "^2.1.3", - "on-finished": "^2.4.1", - "range-parser": "^1.2.1", - "statuses": "^2.0.1" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/serve-static": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz", - "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "parseurl": "^1.3.3", - "send": "^1.2.0" - }, - "engines": { - "node": ">= 18" - } - }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -8375,14 +7830,6 @@ "node": ">= 0.4" } }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true, - "license": "ISC", - "peer": true - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -8557,17 +8004,6 @@ "node": ">=8" } }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -8803,14 +8239,13 @@ } }, "node_modules/synckit": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.4.tgz", - "integrity": "sha512-Q/XQKRaJiLiFIBNN+mndW7S/RHxvwzuZS6ZwmRzUBqJBv/5QIKCEwkBC8GBf8EQJKYnaFs0wOZbKTXBPj8L9oQ==", + "version": "0.11.6", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.6.tgz", + "integrity": "sha512-2pR2ubZSV64f/vqm9eLPz/KOvR9Dm+Co/5ChLgeHl0yEDRc6h5hXHoxEQH8Y5Ljycozd3p1k5TTSVdzYGkPvLw==", "dev": true, "license": "MIT", "dependencies": { - "@pkgr/core": "^0.2.3", - "tslib": "^2.8.1" + "@pkgr/core": "^0.2.4" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -8820,9 +8255,9 @@ } }, "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", + "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", "dev": true, "license": "MIT", "engines": { @@ -8935,17 +8370,6 @@ "node": ">=8.0" } }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.6" - } - }, "node_modules/tr46": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", @@ -8987,9 +8411,9 @@ "license": "Apache-2.0" }, "node_modules/ts-jest": { - "version": "29.3.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.3.2.tgz", - "integrity": "sha512-bJJkrWc6PjFVz5g2DGCNUo8z7oFEYaz1xP1NpeDU7KNLMWPpEyV8Chbpkn8xjzgRDpQhnGMyvyldoL7h8JXyug==", + "version": "29.3.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.3.4.tgz", + "integrity": "sha512-Iqbrm8IXOmV+ggWHOTEbjwyCf2xZlUMv5npExksXohL+tk8va4Fjhb+X2+Rt9NBmgO7bJ8WpnMLOwih/DnMlFA==", "dev": true, "license": "MIT", "dependencies": { @@ -9000,8 +8424,8 @@ "json5": "^2.2.3", "lodash.memoize": "^4.1.2", "make-error": "^1.3.6", - "semver": "^7.7.1", - "type-fest": "^4.39.1", + "semver": "^7.7.2", + "type-fest": "^4.41.0", "yargs-parser": "^21.1.1" }, "bin": { @@ -9129,17 +8553,10 @@ "node": ">=4" } }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD" - }, "node_modules/tsup": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.4.0.tgz", - "integrity": "sha512-b+eZbPCjz10fRryaAA7C8xlIHnf8VnsaRqydheLIqwG/Mcpfk8Z5zp3HayX7GaTygkigHl5cBUs+IhcySiIexQ==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.5.0.tgz", + "integrity": "sha512-VmBp77lWNQq6PfuMqCHD3xWl22vEoWsKajkF8t+yMBawlUS8JzEI+vOVMeuNZIuMML8qXRizFKi9oD5glKQVcQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9149,6 +8566,7 @@ "consola": "^3.4.0", "debug": "^4.4.0", "esbuild": "^0.25.0", + "fix-dts-default-cjs-exports": "^1.0.0", "joycon": "^3.1.1", "picocolors": "^1.1.1", "postcss-load-config": "^6.0.1", @@ -9248,22 +8666,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/type-is": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", - "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "content-type": "^1.0.5", - "media-typer": "^1.1.0", - "mime-types": "^3.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/typed-array-buffer": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", @@ -9357,15 +8759,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.32.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.32.0.tgz", - "integrity": "sha512-UMq2kxdXCzinFFPsXc9o2ozIpYCCOiEC46MG3yEh5Vipq6BO27otTtEBZA1fQ66DulEUgE97ucQ/3YY66CPg0A==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.32.1.tgz", + "integrity": "sha512-D7el+eaDHAmXvrZBy1zpzSNIRqnCOrkwTgZxTu3MUqRWk8k0q9m9Ho4+vPf7iHtgUfrK/o8IZaEApsxPlHTFCg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.32.0", - "@typescript-eslint/parser": "8.32.0", - "@typescript-eslint/utils": "8.32.0" + "@typescript-eslint/eslint-plugin": "8.32.1", + "@typescript-eslint/parser": "8.32.1", + "@typescript-eslint/utils": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -9379,6 +8781,13 @@ "typescript": ">=4.8.4 <5.9.0" } }, + "node_modules/ufo": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz", + "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==", + "dev": true, + "license": "MIT" + }, "node_modules/unbox-primitive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", @@ -9405,17 +8814,6 @@ "dev": true, "license": "MIT" }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/update-browserslist-db": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", @@ -9480,17 +8878,6 @@ "node": ">=10.12.0" } }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -9762,28 +9149,6 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } - }, - "node_modules/zod": { - "version": "3.24.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.4.tgz", - "integrity": "sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==", - "dev": true, - "license": "MIT", - "peer": true, - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/zod-to-json-schema": { - "version": "3.24.5", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.5.tgz", - "integrity": "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==", - "dev": true, - "license": "ISC", - "peer": true, - "peerDependencies": { - "zod": "^3.24.1" - } } } } From eb83df36febeec7fd3f12fa2b59dc9109b454d2b Mon Sep 17 00:00:00 2001 From: Ram-Amoncar Date: Sun, 25 May 2025 00:30:47 +0530 Subject: [PATCH 2/7] lint(fix): template issue --- eslint.config.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 494850d..54513a7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,13 +1,15 @@ 'use strict' +import { defineConfig, globalIgnores } from 'eslint/config' import stylistic from '@stylistic/eslint-plugin' import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' import jest from 'eslint-plugin-jest' import love from 'eslint-config-love' -export default [ +export default defineConfig([ + globalIgnores(['dist/', '**/*.js']), { - ignores: ['dist', '**/*.js'] + files: ['**/*.ts'] }, // Stylistic { @@ -39,9 +41,16 @@ export default [ // Custom { rules: { - '@typescript-eslint/no-magic-numbers': 'off', - 'jest/consistent-test-it': ['error', { fn: 'test' }] + 'jest/consistent-test-it': ['error', { fn: 'test' }], + 'max-nested-callbacks': 'off', + 'max-lines': 'off' }, files: ['tests/**.test.ts'] + }, + { + files: ['**/*.ts'], + rules: { + '@typescript-eslint/no-magic-numbers': 'off' + } } -] +]) From bdf714f01547884ea426c7727616b0706e82e399 Mon Sep 17 00:00:00 2001 From: Ram-Amoncar Date: Sun, 25 May 2025 00:31:54 +0530 Subject: [PATCH 3/7] tsup: fix lint issue --- tsup.config.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tsup.config.ts b/tsup.config.ts index 8d13efa..738df1a 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -13,19 +13,27 @@ interface Result { js?: string } -function generateLicense(): string { - const packInfo = JSON.parse(readFileSync('package.json').toString()) - return `/**\n * ${packInfo.name} v${packInfo.version}\n * Copyright (c) 2024 Ram Amoncar \n * @license ${packInfo.license}\n */` +interface PackageJson { + name?: string + version?: string + license?: string + [key: string]: unknown // Allow other fields } -const license = generateLicense() - function outputExtensions(ctx: Context): Result { if (ctx.format === 'cjs') return { js: '.js' } if (ctx.format === 'esm') return { js: '.mjs' } return { js: '.min.js' } } +function generateLicense(): string { + /* eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- JSON.parse output is assumed to match PackageJson structure based on known package.json format */ + const packInfo = JSON.parse(readFileSync('package.json').toString()) as PackageJson + return `/**\n * ${packInfo.name} v${packInfo.version}\n * Copyright (c) 2024 Ram Amoncar \n * @license ${packInfo.license}\n */` +} + +const license = generateLicense() + export default defineConfig({ splitting: false, entry: ['src/index.ts'], From 45f9ca46f682ecc79ba5c4561209e366388c6f84 Mon Sep 17 00:00:00 2001 From: Ram-Amoncar Date: Sun, 25 May 2025 00:32:56 +0530 Subject: [PATCH 4/7] fix(MAJOR): lint issue --- README.md | 7 ++-- src/.internal/getWords.ts | 10 +++-- src/case.ts | 20 ++++++---- src/index.ts | 7 ++-- src/padding.ts | 79 +++++++++++++++++++++------------------ src/regionMatchers.ts | 28 ++++++-------- tests/padding.test.ts | 32 ++++++++++------ 7 files changed, 101 insertions(+), 82 deletions(-) diff --git a/README.md b/README.md index 4c68481..c7bde69 100644 --- a/README.md +++ b/README.md @@ -90,13 +90,14 @@ padEnd('hello', 'abc', 3, 8); // helloabc Pads a string with a specified fill string a certain number of times on both ends. ```js // Basic usage -padBidirectional('hello', '*', 2); // '**hello**' +padBidirectional('hello', '*', {repeatCount: 2}); // '**hello**' // Limiting total length -padBidirectional('world', '-', 3, 10); // '--world---' +padBidirectional('world', '-', {repeatCount: 3, maxLen: 10}); // '--world---' // Controlling padding distribution -padBidirectional('example', '*', 2, 10, 0); // '**example*' +padBidirectional('example', '*', {repeatCount: 2, maxLen: 10, bias: PaddingBias.START}); +// '**example*' ``` ### merge diff --git a/src/.internal/getWords.ts b/src/.internal/getWords.ts index 6d0ab28..e803bc7 100644 --- a/src/.internal/getWords.ts +++ b/src/.internal/getWords.ts @@ -6,19 +6,21 @@ * Possible values: 'normal', 'camel', 'pascal'. * @returns {string[]} An array of words extracted from the input string based on the specified string case. */ -function getWords(str: string, stringCase: string = 'normal'): string[] { +function getWords(str: string, stringCase = 'normal'): string[] { const splitted: string[] = [] switch (stringCase) { case 'camel': { - const regExpArr = str.match(/^([a-z]+)([a-zA-Z]*)$/) + const regExpArr = /^([a-z]+)([a-zA-Z]*)$/.exec(str) if (regExpArr !== null) splitted.push(regExpArr[1]) } + /* eslint-disable-next-line no-fallthrough -- camel & pascal have same process to extract words, hence saves from repetition of code */ case 'pascal': { const restOfWord = str.split(/[A-Z]/) restOfWord.shift() const capLetters = str.match(/[A-Z]/g) - for (let i = 0; i < restOfWord.length && capLetters !== null; i++) - splitted.push(capLetters[i] + restOfWord[i]) + if (capLetters !== null) { + for (let i = 0; i < restOfWord.length; i++) splitted.push(capLetters[i] + restOfWord[i]) + } break } default: { diff --git a/src/case.ts b/src/case.ts index ae3c669..6f7e759 100644 --- a/src/case.ts +++ b/src/case.ts @@ -51,7 +51,7 @@ function capitalizeWords(str: string): string { * isSnakeCase(' no_space_allowed'); // false * isSnakeCase('no_CAPS'); // false */ -function isSnakeCase(str: string, alphanumeric: boolean = false): boolean { +function isSnakeCase(str: string, alphanumeric = false): boolean { const snakeCase = /^[a-z]+(_[a-z]+)*$/ const snakeCaseWithNumbers = /^([a-z][0-9]*)+(?:_[a-z0-9]+)*$/ return alphanumeric ? snakeCaseWithNumbers.test(str) : snakeCase.test(str) @@ -82,7 +82,7 @@ function isSnakeCase(str: string, alphanumeric: boolean = false): boolean { * isKebabCase(' no-space-allowed'); // false * isKebabCase('no-CAPS'); // false */ -function isKebabCase(str: string, alphanumeric: boolean = false): boolean { +function isKebabCase(str: string, alphanumeric = false): boolean { const kebabCase = /^[a-z]+(-[a-z]+)*$/ const kebabCaseWithNumbers = /^([a-z][0-9]*)+(?:-[a-z0-9]+)*$/ return alphanumeric ? kebabCaseWithNumbers.test(str) : kebabCase.test(str) @@ -150,13 +150,15 @@ function isPascalCase(str: string): boolean { * snakeCase('from-kebab-case'); // 'from_kebab_case' * snakeCase('snake Case With Numbers123', true); // 'snake_case_with_numbers_one_two_three' */ -function snakeCase(str: string, inWords: boolean = false): string { +function snakeCase(str: string, inWords = false): string { if (isCamelCase(str)) return getWords(str, 'camel').join('_').toLowerCase() if (isPascalCase(str)) return getWords(str, 'pascal').join('_').toLowerCase() const numbersInWords = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] - for (let i = 0; inWords && i < numbersInWords.length; i++) { - str = str.replace(RegExp(i.toString(), 'g'), (_char: string) => ' ' + numbersInWords[i] + ' ') + if (inWords) { + for (let i = 0; i < numbersInWords.length; i++) { + str = str.replace(RegExp(i.toString(), 'g'), (_char: string) => ' ' + numbersInWords[i] + ' ') + } } return getWords(str).join('_').toLowerCase() @@ -172,13 +174,15 @@ function snakeCase(str: string, inWords: boolean = false): string { * kebabCase('from_snake_case'); // 'from-snake-case' * kebabCase('kebab Case With Numbers123', true); // 'kebab-case-with-numbers-one-two-three' */ -function kebabCase(str: string, inWords: boolean = false): string { +function kebabCase(str: string, inWords = false): string { if (isCamelCase(str)) return getWords(str, 'camel').join('-').toLowerCase() if (isPascalCase(str)) return getWords(str, 'pascal').join('-').toLowerCase() const numbersInWords = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] - for (let i = 0; inWords && i < numbersInWords.length; i++) { - str = str.replace(RegExp(i.toString(), 'g'), (_char: string) => ' ' + numbersInWords[i] + ' ') + if (inWords) { + for (let i = 0; i < numbersInWords.length; i++) { + str = str.replace(RegExp(i.toString(), 'g'), (_char: string) => ' ' + numbersInWords[i] + ' ') + } } return getWords(str).join('-').toLowerCase() diff --git a/src/index.ts b/src/index.ts index 1f7f1b6..d79d2de 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import { padStart, padEnd, padBidirectional } from './padding' +import { padStart, padEnd, padBidirectional, PaddingBias, type PaddingOptions } from './padding' import { compare, looseCompare } from './compare' import { merge } from './merge' import { @@ -38,7 +38,8 @@ export { looseRegionMatch, isAlpha, isAlphaNumeric, - reverse + reverse, + PaddingBias } -export type { StringRegion } +export type { StringRegion, PaddingOptions } diff --git a/src/padding.ts b/src/padding.ts index 2201cb1..76caedb 100644 --- a/src/padding.ts +++ b/src/padding.ts @@ -1,3 +1,14 @@ +enum PaddingBias { + START = 0, + END = 1 +} + +interface PaddingOptions { + repeatCount?: number + maxLen?: number + bias?: PaddingBias +} + /** * Pads the start (left) of a string with a specified fill string a certain number of times. * @param {string} val - The original string. @@ -12,7 +23,7 @@ * // Limiting total length * padStart('hello', 'abc', 3, 8) // abchello */ -function padStart(val: string, fillString: string = '\u0020', repeatCount: number = 1, maxLen?: number): string { +function padStart(val: string, fillString = '\u0020', repeatCount = 1, maxLen?: number): string { if (typeof maxLen !== 'undefined' && maxLen <= val.length) return val else if (typeof maxLen === 'undefined') { for (let i = 0; i < repeatCount; i++) val = fillString + val @@ -37,7 +48,7 @@ function padStart(val: string, fillString: string = '\u0020', repeatCount: numbe * // Limiting total length * padEnd('hello', 'abc', 3, 8); // helloabc */ -function padEnd(val: string, fillString: string = '\u0020', repeatCount: number = 1, maxLen?: number): string { +function padEnd(val: string, fillString = '\u0020', repeatCount = 1, maxLen?: number): string { if (typeof maxLen !== 'undefined' && maxLen <= val.length) return val else if (typeof maxLen === 'undefined') { for (let i = 0; i < repeatCount; i++) val += fillString @@ -51,9 +62,9 @@ function padEnd(val: string, fillString: string = '\u0020', repeatCount: number * Pads a string with a specified fill string a certain number of times on both ends. * @param {string} val - The original string. * @param {string} fillString - The string to use for padding (default is ' ' | `U+0020` | single whitespace). - * @param {number} repeatCount - The number of times to repeat the fill string (default is 1). - * @param {number} maxLen - The maximum length of the resulting string (optional). - * @param {string} bias - To control the distribution of padding on both sides (optional) (default is 1). + * @param {number} PaddingOptions.repeatCount - The number of times to repeat the fill string (default is 1). + * @param {number} PaddingOptions.maxLen - The maximum length of the resulting string (optional). + * @param {PaddingBias} PaddingOptions.bias - To control the distribution of padding on both sides (optional) (default is 1). * * 0: More padding is given to the start of the string. * @@ -64,45 +75,41 @@ function padEnd(val: string, fillString: string = '\u0020', repeatCount: number * * @example * // Basic usage - * padBidirectional('hello', '*', 2); // '**hello**' + * padBidirectional('hello', '*', {repeatCount: 2}); // '**hello**' * * // Limiting total length - * padBidirectional('world', '-', 3, 10); // '--world---' + * padBidirectional('world', '-', {repeatCount: 3, maxLen: 10}); // '--world---' * * // Controlling padding distribution - * padBidirectional('example', '*', 2, 10, 0); // '**example*' + * padBidirectional('example', '*', {repeatCount: 2, maxLen: 10, bias: PaddingBias.START}); // '**example*' */ -function padBidirectional( - val: string, - fillString: string = '\u0020', - repeatCount: number = 1, - maxLen?: number, - bias: 0 | 1 = 1 -): string { - if (typeof maxLen !== 'undefined' && maxLen <= val.length) return val +function padBidirectional(val: string, fillString = '\u0020', paddingOptions: PaddingOptions = {}): string { + const { repeatCount = 1, maxLen, bias = PaddingBias.END } = paddingOptions + const padding = fillString.repeat(repeatCount) + let start = padding + let end = padding if (typeof maxLen !== 'undefined') { + if (maxLen <= val.length) return val + const remainingSpace = maxLen - val.length - const totalFillLen = fillString.length * repeatCount * 2 - let pad = '' - for (let i = 0; i < repeatCount; i++) pad += fillString - if (remainingSpace < totalFillLen) { - if ((remainingSpace / 2) % 1 === 0) - val = pad.substring(pad.length - remainingSpace / 2) + val + pad.substring(0, remainingSpace / 2) - else if (bias === 0) - val = - pad.substring(pad.length - Math.ceil(remainingSpace / 2)) + - val + - pad.substring(0, Math.floor(remainingSpace / 2)) - else - val = - pad.substring(pad.length - Math.floor(remainingSpace / 2)) + - val + - pad.substring(0, Math.ceil(remainingSpace / 2)) - return val + const totalFillerLength = padding.length * 2 + const halfSpace = remainingSpace / 2 + const isEven = halfSpace % 1 === 0 + + if (remainingSpace < totalFillerLength) { + if (isEven) { + start = padding.substring(padding.length - halfSpace) + end = padding.substring(0, halfSpace) + } else if (bias === PaddingBias.START) { + start = padding.substring(padding.length - Math.ceil(halfSpace)) + end = padding.substring(0, Math.floor(halfSpace)) + } else { + start = padding.substring(padding.length - Math.floor(halfSpace)) + end = padding.substring(0, Math.ceil(halfSpace)) + } } } - for (let i = 0; i < repeatCount; i++) val = fillString + val + fillString - return val + return start + val + end } -export { padStart, padEnd, padBidirectional } +export { padStart, padEnd, padBidirectional, PaddingBias, type PaddingOptions } diff --git a/src/regionMatchers.ts b/src/regionMatchers.ts index 5b271f6..47eb462 100644 --- a/src/regionMatchers.ts +++ b/src/regionMatchers.ts @@ -36,26 +36,20 @@ function regionMatch(str1: StringRegion | string, str2: StringRegion | string, s const ZERO_IDX = 0 // Normalizing Inputs // Strings to StringRegion - if (typeof str1 === 'string' || typeof str2 === 'string') { - start ??= ZERO_IDX - if (typeof str1 === 'string') { - const e = end ?? str1.length - str1 = { str: str1, start, end: e } - } - if (typeof str2 === 'string') { - const e = end ?? str2.length - str2 = { str: str2, start, end: e } - } + if (typeof str1 === 'string') { + const e = end ?? str1.length + str1 = { str: str1, start, end: e } + } + if (typeof str2 === 'string') { + const e = end ?? str2.length + str2 = { str: str2, start, end: e } } - // Getting start and end for both strings - const s1 = str1.start ?? ZERO_IDX - const e1 = str1.end ?? str1.str.length - - const s2 = str2.start ?? ZERO_IDX - const e2 = str2.end ?? str2.str.length + // Zero indexing for both strings if undefined + str1.start ??= ZERO_IDX + str2.start ??= ZERO_IDX - return str1.str.substring(s1, e1) === str2.str.substring(s2, e2) + return str1.str.substring(str1.start, str1.end) === str2.str.substring(str2.start, str2.end) } /** diff --git a/tests/padding.test.ts b/tests/padding.test.ts index 8abacea..af14588 100644 --- a/tests/padding.test.ts +++ b/tests/padding.test.ts @@ -1,4 +1,4 @@ -import { padEnd, padStart, padBidirectional } from '../src/padding' +import { padEnd, padStart, padBidirectional, PaddingBias } from '../src/padding' describe('padStart function', () => { describe('Should pad the start of the string with the fill string repeated the specified number of times', () => { @@ -102,33 +102,43 @@ describe('padBidirectional function', () => { }) test('Should pad with custom fill string and repeat count', () => { - expect(padBidirectional('world', '*', 3)).toBe('***world***') + expect(padBidirectional('world', '*', { repeatCount: 3 })).toBe('***world***') }) test('Should limit total length with bias', () => { - expect(padBidirectional('example', '*', 2, 10, 0)).toBe('**example*') - expect(padBidirectional('example', '*', 2, 10, 1)).toBe('*example**') + expect(padBidirectional('example', '*', { repeatCount: 2, maxLen: 10, bias: PaddingBias.START })).toBe( + '**example*' + ) + expect(padBidirectional('example', '*', { repeatCount: 2, maxLen: 10, bias: PaddingBias.END })).toBe( + '*example**' + ) }) test('Should handle empty string input', () => { expect(padBidirectional('')).toBe(' ') - expect(padBidirectional('', '-', 2)).toBe('----') + expect(padBidirectional('', '-', { repeatCount: 3 })).toBe('------') }) test('Should evenly pad for even maxLen', () => { - expect(padBidirectional('test', '-', 2, 10)).toBe('--test--') + expect(padBidirectional('test', '-', { repeatCount: 2, maxLen: 10 })).toBe('--test--') }) test('Should return input string if maxlen is less than traget string length', () => { - expect(padBidirectional('test', '-', 1, 4)).toBe('test') + expect(padBidirectional('test', '-', { repeatCount: 1, maxLen: 4 })).toBe('test') }) test('Should ignore bias', () => { - expect(padBidirectional('test', '*', 3, 10, 0)).toBe('***test***') - expect(padBidirectional('test', '*', 3, 10, 1)).toBe('***test***') + expect(padBidirectional('test', '*', { repeatCount: 3, maxLen: 10, bias: PaddingBias.START })).toBe( + '***test***' + ) + expect(padBidirectional('test', '*', { repeatCount: 3, maxLen: 10, bias: PaddingBias.END })).toBe('***test***') }) test('Should properly pad at start & end in case of maxlen limit', () => { - expect(padBidirectional('test', 'abc', 3, 11, 0)).toBe('cabctestabc') - expect(padBidirectional('test', 'abc', 3, 12, 0)).toBe('cabctestabca') + expect(padBidirectional('test', 'abc', { repeatCount: 3, maxLen: 11, bias: PaddingBias.START })).toBe( + 'cabctestabc' + ) + expect(padBidirectional('test', 'abc', { repeatCount: 3, maxLen: 12, bias: PaddingBias.START })).toBe( + 'cabctestabca' + ) }) }) From 36de7efa507244ccac4f196c5d1fdfb86f5d974c Mon Sep 17 00:00:00 2001 From: Ram-Amoncar Date: Sun, 25 May 2025 12:29:10 +0530 Subject: [PATCH 5/7] feat: i18n support --- src/case.ts | 40 +++++++++++++++++++++------------------- src/compare.ts | 4 ++-- src/regionMatchers.ts | 12 +++++++----- 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/src/case.ts b/src/case.ts index 6f7e759..cd17403 100644 --- a/src/case.ts +++ b/src/case.ts @@ -8,8 +8,8 @@ import { getWords } from './.internal/getWords' * capitalizeInitial('hello'); // 'Hello' * capitalizeInitial(':> hello'); // ':> Hello' */ -function capitalizeInitial(str: string): string { - return str.replace(/\b\w/, (char: string) => char.toUpperCase()) +function capitalizeInitial(str: string, locales?: Intl.LocalesArgument): string { + return str.replace(/\b\w/, (char: string) => char.toLocaleUpperCase(locales)) } /** @@ -22,8 +22,8 @@ function capitalizeInitial(str: string): string { * capitalizeWords('Sphinx of black quartz:-judge my vow'); * // 'Sphinx Of Black Quartz:-Judge My Vow' */ -function capitalizeWords(str: string): string { - return str.replace(/\b\w/g, (char: string) => char.toUpperCase()) +function capitalizeWords(str: string, locales?: Intl.LocalesArgument): string { + return str.replace(/\b\w/g, (char: string) => char.toLocaleUpperCase(locales)) } /** @@ -150,9 +150,9 @@ function isPascalCase(str: string): boolean { * snakeCase('from-kebab-case'); // 'from_kebab_case' * snakeCase('snake Case With Numbers123', true); // 'snake_case_with_numbers_one_two_three' */ -function snakeCase(str: string, inWords = false): string { - if (isCamelCase(str)) return getWords(str, 'camel').join('_').toLowerCase() - if (isPascalCase(str)) return getWords(str, 'pascal').join('_').toLowerCase() +function snakeCase(str: string, inWords = false, locales?: Intl.LocalesArgument): string { + if (isCamelCase(str)) return getWords(str, 'camel').join('_').toLocaleLowerCase(locales) + if (isPascalCase(str)) return getWords(str, 'pascal').join('_').toLocaleLowerCase(locales) const numbersInWords = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] if (inWords) { @@ -161,7 +161,7 @@ function snakeCase(str: string, inWords = false): string { } } - return getWords(str).join('_').toLowerCase() + return getWords(str).join('_').toLocaleLowerCase(locales) } /** @@ -174,9 +174,9 @@ function snakeCase(str: string, inWords = false): string { * kebabCase('from_snake_case'); // 'from-snake-case' * kebabCase('kebab Case With Numbers123', true); // 'kebab-case-with-numbers-one-two-three' */ -function kebabCase(str: string, inWords = false): string { - if (isCamelCase(str)) return getWords(str, 'camel').join('-').toLowerCase() - if (isPascalCase(str)) return getWords(str, 'pascal').join('-').toLowerCase() +function kebabCase(str: string, inWords = false, locales?: Intl.LocalesArgument): string { + if (isCamelCase(str)) return getWords(str, 'camel').join('-').toLocaleLowerCase(locales) + if (isPascalCase(str)) return getWords(str, 'pascal').join('-').toLocaleLowerCase(locales) const numbersInWords = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] if (inWords) { @@ -185,7 +185,7 @@ function kebabCase(str: string, inWords = false): string { } } - return getWords(str).join('-').toLowerCase() + return getWords(str).join('-').toLocaleLowerCase(locales) } /** @@ -197,14 +197,16 @@ function kebabCase(str: string, inWords = false): string { * camelCase('Test CaSe ExamplE'); // 'testCaseExample' * camelCase('camel Case With Numbers123'); // 'camelCaseWithNumbers' */ -function camelCase(str: string): string { +function camelCase(str: string, locales?: Intl.LocalesArgument): string { str = str.replace(/[^a-zA-Z]/g, ' ') if (isCamelCase(str)) return str - if (isPascalCase(str)) return str.charAt(0).toLowerCase() + str.substring(1) + if (isPascalCase(str)) return str.charAt(0).toLocaleLowerCase(locales) + str.substring(1) return getWords(str).reduce((prev: string, curVal: string, i: number): string => i !== 1 - ? prev + curVal.charAt(0).toUpperCase() + curVal.substring(1).toLowerCase() - : prev.toLowerCase() + curVal.charAt(0).toUpperCase() + curVal.substring(1).toLowerCase() + ? prev + curVal.charAt(0).toLocaleUpperCase(locales) + curVal.substring(1).toLocaleLowerCase(locales) + : prev.toLocaleLowerCase(locales) + + curVal.charAt(0).toLocaleUpperCase(locales) + + curVal.substring(1).toLocaleLowerCase(locales) ) } @@ -217,13 +219,13 @@ function camelCase(str: string): string { * pascalCase('Test CaSe ExamplE'); // 'TestCaseExample' * pascalCase('pasCal Case With Numbers123'); // 'PascalCaseWithNumbers' */ -function pascalCase(str: string): string { +function pascalCase(str: string, locales?: Intl.LocalesArgument): string { str = str.replace(/[^a-zA-Z]/g, ' ') if (isPascalCase(str)) return str - if (isCamelCase(str)) return str.charAt(0).toUpperCase() + str.substring(1) + if (isCamelCase(str)) return str.charAt(0).toLocaleUpperCase(locales) + str.substring(1) return getWords(str).reduce( (prev: string, curVal: string): string => - prev + curVal.charAt(0).toUpperCase() + curVal.substring(1).toLowerCase(), + prev + curVal.charAt(0).toLocaleUpperCase(locales) + curVal.substring(1).toLocaleLowerCase(locales), '' ) diff --git a/src/compare.ts b/src/compare.ts index 9300576..7afaf3b 100644 --- a/src/compare.ts +++ b/src/compare.ts @@ -30,8 +30,8 @@ function compare(str1: string, str2: string): boolean { * @description * The `looseCompare` function performs a case-insensitive loose comparison between two strings. */ -function looseCompare(str1: string, str2: string): boolean { - return str1.toLowerCase() === str2.toLowerCase() +function looseCompare(str1: string, str2: string, locales?: Intl.LocalesArgument): boolean { + return str1.toLocaleLowerCase(locales) === str2.toLocaleLowerCase(locales) } export { compare, looseCompare } diff --git a/src/regionMatchers.ts b/src/regionMatchers.ts index 47eb462..1eda082 100644 --- a/src/regionMatchers.ts +++ b/src/regionMatchers.ts @@ -75,16 +75,18 @@ function regionMatch(str1: StringRegion | string, str2: StringRegion | string, s * const str6 = { str: 'HelLo there', start: 0, end: 5 }; * looseRegionMatch(str5, str6); // true */ +/* eslint-disable-next-line @typescript-eslint/max-params -- locales parameter enhances user accessibility and internationalization support */ function looseRegionMatch( str1: StringRegion | string, str2: StringRegion | string, start?: number, - end?: number + end?: number, + locales?: Intl.LocalesArgument ): boolean { - if (typeof str1 === 'string') str1 = str1.toLowerCase() - else str1.str = str1.str.toLowerCase() - if (typeof str2 === 'string') str2 = str2.toLowerCase() - else str2.str = str2.str.toLowerCase() + if (typeof str1 === 'string') str1 = str1.toLocaleLowerCase(locales) + else str1.str = str1.str.toLocaleLowerCase(locales) + if (typeof str2 === 'string') str2 = str2.toLocaleLowerCase(locales) + else str2.str = str2.str.toLocaleLowerCase(locales) return regionMatch(str1, str2, start, end) } From 7f36987d522afff4cac97dc9bfe011788fb17d57 Mon Sep 17 00:00:00 2001 From: Ram-Amoncar Date: Sun, 25 May 2025 13:12:09 +0530 Subject: [PATCH 6/7] refactor: core functions --- src/case.ts | 4 ++-- src/merge.ts | 10 +++++----- src/padding.ts | 27 ++++++++++++--------------- src/regionMatchers.ts | 15 ++++++++++----- 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/src/case.ts b/src/case.ts index cd17403..28d4ecb 100644 --- a/src/case.ts +++ b/src/case.ts @@ -157,7 +157,7 @@ function snakeCase(str: string, inWords = false, locales?: Intl.LocalesArgument) const numbersInWords = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] if (inWords) { for (let i = 0; i < numbersInWords.length; i++) { - str = str.replace(RegExp(i.toString(), 'g'), (_char: string) => ' ' + numbersInWords[i] + ' ') + str = str.replace(RegExp(i.toString(), 'g'), () => ' ' + numbersInWords[i] + ' ') } } @@ -181,7 +181,7 @@ function kebabCase(str: string, inWords = false, locales?: Intl.LocalesArgument) const numbersInWords = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] if (inWords) { for (let i = 0; i < numbersInWords.length; i++) { - str = str.replace(RegExp(i.toString(), 'g'), (_char: string) => ' ' + numbersInWords[i] + ' ') + str = str.replace(RegExp(i.toString(), 'g'), () => ' ' + numbersInWords[i] + ' ') } } diff --git a/src/merge.ts b/src/merge.ts index 27959af..2f10488 100644 --- a/src/merge.ts +++ b/src/merge.ts @@ -22,12 +22,12 @@ */ function merge(sep: string | boolean, ...strings: string[] | string[][]): string { strings = strings.flat() - for (let i = 0, val = ''; i < strings.length; i++) { - if (strings.length - 1 === i) return val + strings[i] - else if (typeof sep === 'boolean') val += sep ? strings[i] + ' ' : strings[i] - else val += strings[i] + sep + if (typeof sep === 'boolean') { + const separator = sep ? ' ' : '' + return strings.length === 0 ? separator : strings.join(separator) } - return typeof sep === 'boolean' ? (sep ? ' ' : '') : sep + if (strings.length === 0) return sep + return strings.join(sep) } export { merge } diff --git a/src/padding.ts b/src/padding.ts index 76caedb..47760df 100644 --- a/src/padding.ts +++ b/src/padding.ts @@ -24,14 +24,12 @@ interface PaddingOptions { * padStart('hello', 'abc', 3, 8) // abchello */ function padStart(val: string, fillString = '\u0020', repeatCount = 1, maxLen?: number): string { - if (typeof maxLen !== 'undefined' && maxLen <= val.length) return val - else if (typeof maxLen === 'undefined') { - for (let i = 0; i < repeatCount; i++) val = fillString + val - return val - } - for (let i = 0; i < repeatCount && val.length <= maxLen; i++) val = fillString + val - const finalVal = val.length > maxLen ? val.substring(Math.abs(maxLen - val.length)) : val - return finalVal + const padding = fillString.repeat(repeatCount) + if (typeof maxLen === 'undefined') return padding + val + if (maxLen <= val.length) return val + + const remSpace = maxLen - val.length + return padding.slice(-remSpace) + val } /** @@ -49,13 +47,12 @@ function padStart(val: string, fillString = '\u0020', repeatCount = 1, maxLen?: * padEnd('hello', 'abc', 3, 8); // helloabc */ function padEnd(val: string, fillString = '\u0020', repeatCount = 1, maxLen?: number): string { - if (typeof maxLen !== 'undefined' && maxLen <= val.length) return val - else if (typeof maxLen === 'undefined') { - for (let i = 0; i < repeatCount; i++) val += fillString - return val - } - for (let i = 0; i < repeatCount && val.length <= maxLen; i++) val += fillString - return val.substring(0, maxLen) + const padding = fillString.repeat(repeatCount) + if (typeof maxLen === 'undefined') return val + padding + if (maxLen <= val.length) return val + + const remSpace = maxLen - val.length + return val + padding.substring(0, remSpace) } /** diff --git a/src/regionMatchers.ts b/src/regionMatchers.ts index 1eda082..01774cc 100644 --- a/src/regionMatchers.ts +++ b/src/regionMatchers.ts @@ -83,12 +83,17 @@ function looseRegionMatch( end?: number, locales?: Intl.LocalesArgument ): boolean { - if (typeof str1 === 'string') str1 = str1.toLocaleLowerCase(locales) - else str1.str = str1.str.toLocaleLowerCase(locales) - if (typeof str2 === 'string') str2 = str2.toLocaleLowerCase(locales) - else str2.str = str2.str.toLocaleLowerCase(locales) + if (typeof str1 === 'string') { + const e = end ?? str1.length + str1 = { str: str1.toLocaleLowerCase(locales), start, end: e } + } else str1.str = str1.str.toLocaleLowerCase(locales) + + if (typeof str2 === 'string') { + const e = end ?? str2.length + str2 = { str: str2.toLocaleLowerCase(locales), start, end: e } + } else str2.str = str2.str.toLocaleLowerCase(locales) - return regionMatch(str1, str2, start, end) + return regionMatch(str1, str2) } export { regionMatch, looseRegionMatch, type StringRegion } From c7f9c8a45b0a484b20aff1e5039087f036bc6565 Mon Sep 17 00:00:00 2001 From: Ram-Amoncar Date: Thu, 29 May 2025 14:17:37 +0530 Subject: [PATCH 7/7] refactor: reduce internal docs docs: refactored readme.md --- README.md | 59 ++++++++++++++++++--- src/case.ts | 120 ------------------------------------------ src/compare.ts | 22 -------- src/merge.ts | 21 +------- src/padding.ts | 44 ---------------- src/regionMatchers.ts | 45 ---------------- src/reverse.ts | 2 - src/validators.ts | 10 ---- 8 files changed, 53 insertions(+), 270 deletions(-) diff --git a/README.md b/README.md index c7bde69..19bc8ad 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ A lightweight and versatile String Utility Package for Node.js & Browser. # Contents + * [Install](#install) * [require](#require) * [import](#import) @@ -37,14 +38,11 @@ A lightweight and versatile String Utility Package for Node.js & Browser. * [isAlpha](#isalpha) * [isAlphaNumeric](#isalphanumeric) * [reverse](#reverse) - - (Coming Soon) - * [StringBuilder](#) - * [StringValidator](#) * [Build](#build) * [License](#license) -## install +## Install + ```sh npm install @full-pack/string-pack ``` @@ -61,13 +59,16 @@ const { ... } = require('@full-pack/string-pack'); import { ... } from '@full-pack/string-pack'; ``` -## API +## APIs + +### Padding -### padding Adds padding to given string. ##### padStart + Pads the start of a string with a specified fill string a certain number of times. + ```js // Basic Usage padStart('hello', 'abc', 3) // abcabcabchello @@ -77,7 +78,9 @@ padStart('hello', 'abc', 3, 8) // abchello ``` ##### padEnd + Pads the end of a string with a specified fill string a certain number of times. + ```js // Basic Usage padEnd('hello', 'abc', 3); // helloabcabcabc @@ -87,7 +90,9 @@ padEnd('hello', 'abc', 3, 8); // helloabc ``` ##### padBidirectional + Pads a string with a specified fill string a certain number of times on both ends. + ```js // Basic usage padBidirectional('hello', '*', {repeatCount: 2}); // '**hello**' @@ -101,7 +106,9 @@ padBidirectional('example', '*', {repeatCount: 2, maxLen: 10, bias: PaddingBias. ``` ### merge + Merges an array of strings into a single string using a specified separator. + ```js merge('-', 'apple', 'orange', 'banana'); // 'apple-orange-banana' @@ -111,7 +118,9 @@ merge(false, 'apple', 'orange', 'banana'); // 'appleorangebanana' ``` ### compare + Performs a strict comparison between two strings. + ```js compare("hello", "hello"); // true @@ -119,7 +128,9 @@ compare("abc", "ABC"); // false ``` ### looseCompare + Performs a case-insensitive loose comparison between two strings. + ```js looseCompare("hello", "HELLO"); // true @@ -127,7 +138,9 @@ looseCompare('abc', '123'); // false ``` ### capitalizeInitial + Capitalizes the first letter of a word in a string. + ```js capitalizeInitial('hello'); // 'Hello' @@ -135,7 +148,9 @@ capitalizeInitial(':> hello'); // ':> Hello' ``` ### capitalizeWords + Capitalizes the first letter of each word in a given string. + ```js capitalizeWords('hello world'); // 'Hello World' @@ -145,7 +160,9 @@ capitalizeWords('Sphinx of black quartz:-judge my vow'); // 'Sphinx Of Black Qua ### Case Conversion #### snakeCase + Converts a string to snake_case format. + ```js snakeCase('hello WorLd'); // 'hello_world' snakeCase('from-kebab-case'); // 'from_kebab_case' @@ -153,7 +170,9 @@ snakeCase('snake Case With Numbers123', true); // 'snake_case_with_numbers_one_t ``` #### kebabCase + Converts a string to kebab-case format. + ```js kebabCase('h3llo WoRld'); // 'h3llo-world' kebabCase('from_snake_case'); // 'from-snake-case' @@ -161,7 +180,9 @@ kebabCase('kebab Case With Numbers123', true); // 'kebab-case-with-numbers-one-t ``` #### camelCase + Converts a string to camelCase format. + ```js camelCase('hello WoRld'); // 'helloWorld' camelCase('Test CaSe ExamplE'); // 'testCaseExample' @@ -169,7 +190,9 @@ camelCase('camel Case With Numbers123'); // 'camelCaseWithNumbers' ``` #### pascalCase + Converts a string to PascalCase format. + ```js pascalCase('hello WoRld'); // 'HelloWorld' pascalCase('Test CaSe ExamplE'); // 'TestCaseExample' @@ -179,7 +202,9 @@ pascalCase('pasCal Case With Numbers123'); // 'PascalCaseWithNumbers' ### Case Validation #### isSnakeCase + Checks if a string is in snake_case format. + ```js // Valid isSnakeCase('snake_case_example'); // true @@ -196,7 +221,9 @@ isSnakeCase('no_CAPS'); // false ``` #### isKebabCase + Checks if a string is in kebab-case format. + ```js // Valid isKebabCase('kebab-case-example'); // true @@ -213,7 +240,9 @@ isKebabCase('no-CAPS'); // false ``` #### isCamelCase + Checks if a string is in camelCase format. + ```js // Valid isCamelCase('camelCaseExample'); // true @@ -226,7 +255,9 @@ isCamelCase('withThe1234'); // false ``` #### isPascalCase + Checks if a string is in PascalCase format. + ```js // Valid isPascalCase('PascalCaseExample'); // true @@ -239,7 +270,9 @@ isPascalCase('WithThe1234'); // false ``` ### regionMatch + Compares two strings or regions for equality. + ```js // Matching identical strings regionMatch('hello', 'hello'); // true @@ -256,7 +289,9 @@ regionMatch('hello world', 'hello there', 6, 11); // false ``` ### looseRegionMatch + Performs a loose comparison of two strings or regions for equality. + ```js // Loose matching identical strings looseRegionMatch('hello', 'HeLLo'); // true @@ -268,29 +303,39 @@ looseRegionMatch(str1, str2); // true ``` ### isAlpha + Checks if a string contains only alphabetic characters (A-Z, a-z). + ```js isAlpha("HelloWorld"); // true isAlpha("Hello123"); // false ``` ### isAlphaNumeric + Checks if a string contains only alphanumeric characters (A-Z, a-z, 0-9). + ```js isAlphaNumeric("Hello01"); // true isAlphaNumeric("1234567890"); // false ``` ### Reverse + Reverses the sequence of characters in given string. + ```js reverse('bad') // 'dab' ``` +Full documentation [here](https://full-pack.github.io/string-pack) + ## Build + ``` npm run build ``` ## License + The MIT License. Full License is [here](LICENSE) diff --git a/src/case.ts b/src/case.ts index 28d4ecb..9ab70a7 100644 --- a/src/case.ts +++ b/src/case.ts @@ -2,11 +2,6 @@ import { getWords } from './.internal/getWords' /** * Capitalizes the first letter of a word in a string. - * @param {string} str - The input string. - * @returns {string} The string with the first letter capitalized. - * @example - * capitalizeInitial('hello'); // 'Hello' - * capitalizeInitial(':> hello'); // ':> Hello' */ function capitalizeInitial(str: string, locales?: Intl.LocalesArgument): string { return str.replace(/\b\w/, (char: string) => char.toLocaleUpperCase(locales)) @@ -14,13 +9,6 @@ function capitalizeInitial(str: string, locales?: Intl.LocalesArgument): string /** * Capitalizes the first letter of each word in a given string. - * @param {string} str - The input string containing words to be capitalized. - * @returns {string} Returns the input string with the first letter of each word capitalized. - * @example - * capitalizeWords('hello world'); - * // 'Hello World' - * capitalizeWords('Sphinx of black quartz:-judge my vow'); - * // 'Sphinx Of Black Quartz:-Judge My Vow' */ function capitalizeWords(str: string, locales?: Intl.LocalesArgument): string { return str.replace(/\b\w/g, (char: string) => char.toLocaleUpperCase(locales)) @@ -28,28 +16,6 @@ function capitalizeWords(str: string, locales?: Intl.LocalesArgument): string { /** * Checks if a string is in snake_case format. - * @param {string} str - The string to be checked. - * @param {boolean} alphanumeric - If true, allows numbers in the string. - * @returns {boolean} - True if the string is in snake_case format, false otherwise. - * ----- - * ### Conventions - * - Use lowercase letters. - * - Separate words with underscores ("_"). - * - *No numbers allowed, unless specified otherwise.* - * ----- - * @example - * // Valid - * isSnakeCase('snake_case_example'); // true - * isSnakeCase('hello_world'); // true - * - * // Valid with alphanumeric flag - * isSnakeCase('with_1234', true); // true - * isSnakeCase('pi_3_14', true); // true - * - * // Invalid - * isSnakeCase('123at_start'); // false - * isSnakeCase(' no_space_allowed'); // false - * isSnakeCase('no_CAPS'); // false */ function isSnakeCase(str: string, alphanumeric = false): boolean { const snakeCase = /^[a-z]+(_[a-z]+)*$/ @@ -59,28 +25,6 @@ function isSnakeCase(str: string, alphanumeric = false): boolean { /** * Checks if a string is in kebab-case format. - * @param {string} str - The string to be checked. - * @param {boolean} alphanumeric - If true, allows numbers in the string. - * @returns {boolean} True if the string is in kebab-case format, false otherwise. - * ----- - * ### Conventions - * - Use lowercase letters. - * - Separate words with hyphens ("-"). - * - *No numbers allowed, unless specified otherwise.* - * ----- - * @example - * // Valid - * isKebabCase('kebab-case-example'); // true - * isKebabCase('hello-world'); // true - * - * // Valid with alphanumeric flag - * isKebabCase('with-1234', true); // true - * isKebabCase('pi-3-14', true); // true - * - * // Invalid - * isKebabCase('123at-start'); // false - * isKebabCase(' no-space-allowed'); // false - * isKebabCase('no-CAPS'); // false */ function isKebabCase(str: string, alphanumeric = false): boolean { const kebabCase = /^[a-z]+(-[a-z]+)*$/ @@ -90,25 +34,6 @@ function isKebabCase(str: string, alphanumeric = false): boolean { /** * Checks if a string is in camelCase format. - * @param {string} str - The string to be checked. - * @returns {boolean} True if the string is in camelCase format, false otherwise. - * ----- - * ### Conventions - * - Start with a lowercase letter. - * - Use uppercase for each new word. - * - Should consist of only letters. - * - No separator between words allowed. - * - No numbers allowed. - * ----- - * @example - * // Valid - * isCamelCase('camelCaseExample'); // true - * isCamelCase('helloWorld'); // true - * - * // Invalid - * isCamelCase('CAMEL'); // false - * isCamelCase(' noSpaceAllowed'); // false - * isCamelCase('withThe1234'); // false */ function isCamelCase(str: string): boolean { return /^[a-z]+[a-zA-Z]*$/.test(str) @@ -116,25 +41,6 @@ function isCamelCase(str: string): boolean { /** * Checks if a string is in PascalCase format. - * @param {string} str - The string to be checked. - * @returns {boolean} True if the string is in PascalCase format, false otherwise. - * ----- - * ### Conventions - * - Start with an uppercase letter. - * - Use uppercase for each new word. - * - Should consist of only letters. - * - No separator between words allowed. - * - No numbers allowed. - * ----- - * @example - * // Valid - * isPascalCase('PascalCaseExample'); // true - * isPascalCase('HelloWorld'); // true - * - * // Invalid - * isPascalCase('PASCAL'); // false - * isPascalCase(' NoSpaceAllowed');; // false - * isPascalCase('WithThe1234'); // false */ function isPascalCase(str: string): boolean { return /^[A-Z][a-z]+[a-zA-Z]*$/.test(str) @@ -142,13 +48,6 @@ function isPascalCase(str: string): boolean { /** * Converts a string to snake_case format. - * @param {string} str The string to be converted. - * @param {boolean} inWords If true, converts numbers to words in snake_case format. - * @returns {string} The string converted to snake_case format. - * @example - * snakeCase('hello WorLd'); // 'hello_world' - * snakeCase('from-kebab-case'); // 'from_kebab_case' - * snakeCase('snake Case With Numbers123', true); // 'snake_case_with_numbers_one_two_three' */ function snakeCase(str: string, inWords = false, locales?: Intl.LocalesArgument): string { if (isCamelCase(str)) return getWords(str, 'camel').join('_').toLocaleLowerCase(locales) @@ -166,13 +65,6 @@ function snakeCase(str: string, inWords = false, locales?: Intl.LocalesArgument) /** * Converts a string to kebab-case format. - * @param {string} str The string to be converted. - * @param {boolean} inWords If true, converts numbers to words in kebab-case format. - * @returns {string} The string converted to kebab-case format. - * @example - * kebabCase('h3llo WoRld'); // 'h3llo-world' - * kebabCase('from_snake_case'); // 'from-snake-case' - * kebabCase('kebab Case With Numbers123', true); // 'kebab-case-with-numbers-one-two-three' */ function kebabCase(str: string, inWords = false, locales?: Intl.LocalesArgument): string { if (isCamelCase(str)) return getWords(str, 'camel').join('-').toLocaleLowerCase(locales) @@ -190,12 +82,6 @@ function kebabCase(str: string, inWords = false, locales?: Intl.LocalesArgument) /** * Converts a string to camelCase format. - * @param {string} str The string to be converted. - * @returns {string} The string converted to camelCase format. - * @example - * camelCase('hello WoRld'); // 'helloWorld' - * camelCase('Test CaSe ExamplE'); // 'testCaseExample' - * camelCase('camel Case With Numbers123'); // 'camelCaseWithNumbers' */ function camelCase(str: string, locales?: Intl.LocalesArgument): string { str = str.replace(/[^a-zA-Z]/g, ' ') @@ -212,12 +98,6 @@ function camelCase(str: string, locales?: Intl.LocalesArgument): string { /** * Converts a string to PascalCase format. - * @param {string} str The string to be converted. - * @returns {string} The string converted to PascalCase format. - * @example - * pascalCase('hello WoRld'); // 'HelloWorld' - * pascalCase('Test CaSe ExamplE'); // 'TestCaseExample' - * pascalCase('pasCal Case With Numbers123'); // 'PascalCaseWithNumbers' */ function pascalCase(str: string, locales?: Intl.LocalesArgument): string { str = str.replace(/[^a-zA-Z]/g, ' ') diff --git a/src/compare.ts b/src/compare.ts index 7afaf3b..403bbce 100644 --- a/src/compare.ts +++ b/src/compare.ts @@ -1,16 +1,5 @@ /** * Performs a strict comparison between two strings. - * @param {string} str1 - The first string for comparison. - * @param {string} str2 - The second string for comparison. - * @returns {boolean} Returns true if the strings are equal; otherwise, false. - * - * @example - * compare("hello", "hello"); // true - * - * compare("abc", "ABC"); // false - * - * @description - * The `compare` function performs a case-sensitive strict comparison between two strings. */ function compare(str1: string, str2: string): boolean { return str1 === str2 @@ -18,17 +7,6 @@ function compare(str1: string, str2: string): boolean { /** * Performs a case-insensitive loose comparison between two strings. - * @param {string} str1 - The first string for comparison. - * @param {string} str2 - The second string for comparison. - * @returns {boolean} Returns true if the strings are equal (case-insensitive); otherwise, false. - * - * @example - * looseCompare("hello", "HELLO"); // true - * - * looseCompare("abc", "123"); // false - * - * @description - * The `looseCompare` function performs a case-insensitive loose comparison between two strings. */ function looseCompare(str1: string, str2: string, locales?: Intl.LocalesArgument): boolean { return str1.toLocaleLowerCase(locales) === str2.toLocaleLowerCase(locales) diff --git a/src/merge.ts b/src/merge.ts index 2f10488..1bfe288 100644 --- a/src/merge.ts +++ b/src/merge.ts @@ -1,24 +1,5 @@ /** - * Merges an array of strings into a single string using a specified separator. - * @param {string | boolean} sep - The separator to use between merged strings. - * - Provide a string to use as a separator between strings. - * - Provide `false` or an empty string (`''`) for no separator. - * - Provide `true` for a space (`' '`) as the separator. - * @param {string[]} strings - The array of strings to merge. - * @returns {string} The merged string. - * - * @example - * merge('-', 'apple', 'orange', 'banana'); // 'apple-orange-banana' - * - * merge(true, 'apple', 'orange'); // 'apple orange' - * - * merge(false, 'apple', 'orange', 'banana'); // 'appleorangebanana' - * - * @description - * The `merge` function concatenates an array of strings into a single string with the specified separator. - * - Use `sep` as a string for a custom separator between strings. - * - Provide `false` or an empty string (`''`) for no separator. - * - Provide `true` for a space (`' '`) as the separator. + * Merges array(s) of strings into a single string using a specified separator. */ function merge(sep: string | boolean, ...strings: string[] | string[][]): string { strings = strings.flat() diff --git a/src/padding.ts b/src/padding.ts index 47760df..c901617 100644 --- a/src/padding.ts +++ b/src/padding.ts @@ -11,17 +11,6 @@ interface PaddingOptions { /** * Pads the start (left) of a string with a specified fill string a certain number of times. - * @param {string} val - The original string. - * @param {string} fillString - The string to use for padding. (default is ' ' | `U+0020` | single whitespace). - * @param {number} repeatCount - The number of times to repeat the fill string (default is 1). - * @param {number} maxLen - The maximum length of the resulting string (optional). - * @returns {string} The padded string. - * @example - * // Basic Usage - * padStart('hello', 'abc', 3) // abcabcabchello - * - * // Limiting total length - * padStart('hello', 'abc', 3, 8) // abchello */ function padStart(val: string, fillString = '\u0020', repeatCount = 1, maxLen?: number): string { const padding = fillString.repeat(repeatCount) @@ -34,17 +23,6 @@ function padStart(val: string, fillString = '\u0020', repeatCount = 1, maxLen?: /** * Pads the end (right) of a string with a specified fill string a certain number of times. - * @param {string} val - The original string. - * @param {string} fillString - The string to use for padding (default is ' ' | `U+0020` | single whitespace). - * @param {number} repeatCount - The number of times to repeat the fill string (default is 1). - * @param {number} maxLen - The maximum length of the resulting string (optional). - * @returns {string} The padded string. - * @example - * // Basic Usage - * padEnd('hello', 'abc', 3); // helloabcabcabc - * - * // Limiting total length - * padEnd('hello', 'abc', 3, 8); // helloabc */ function padEnd(val: string, fillString = '\u0020', repeatCount = 1, maxLen?: number): string { const padding = fillString.repeat(repeatCount) @@ -57,28 +35,6 @@ function padEnd(val: string, fillString = '\u0020', repeatCount = 1, maxLen?: nu /** * Pads a string with a specified fill string a certain number of times on both ends. - * @param {string} val - The original string. - * @param {string} fillString - The string to use for padding (default is ' ' | `U+0020` | single whitespace). - * @param {number} PaddingOptions.repeatCount - The number of times to repeat the fill string (default is 1). - * @param {number} PaddingOptions.maxLen - The maximum length of the resulting string (optional). - * @param {PaddingBias} PaddingOptions.bias - To control the distribution of padding on both sides (optional) (default is 1). - * - * 0: More padding is given to the start of the string. - * - * 1: More padding is given to the end of the string (default). - * - * **NOTE: bias is only applied if maxlen is defined & odd length of string** - * @returns {string} The padded string. - * - * @example - * // Basic usage - * padBidirectional('hello', '*', {repeatCount: 2}); // '**hello**' - * - * // Limiting total length - * padBidirectional('world', '-', {repeatCount: 3, maxLen: 10}); // '--world---' - * - * // Controlling padding distribution - * padBidirectional('example', '*', {repeatCount: 2, maxLen: 10, bias: PaddingBias.START}); // '**example*' */ function padBidirectional(val: string, fillString = '\u0020', paddingOptions: PaddingOptions = {}): string { const { repeatCount = 1, maxLen, bias = PaddingBias.END } = paddingOptions diff --git a/src/regionMatchers.ts b/src/regionMatchers.ts index 01774cc..9d1d4b6 100644 --- a/src/regionMatchers.ts +++ b/src/regionMatchers.ts @@ -6,31 +6,6 @@ interface StringRegion { /** * Compares two strings or regions for equality. - * @param {StringRegion | string} str1 - The first string or region to compare. - * @param {StringRegion | string} str2 - The second string or region to compare. - * @param {number} start - The starting index of the region in the first string (optional). - * @param {number} end - The ending index of the region in the first string (optional). - * @returns {boolean} True if the strings or regions match, false otherwise. - * - * **Note: `end` index is not taken in consideration** - * @example - * // Matching identical strings - * regionMatch('hello', 'hello'); // true - * - * // Matching identical regions in strings - * const str1 = { str: 'hello world', start: 0, end: 5 }; - * const str2 = { str: 'hello there', start: 0, end: 5 }; - * regionMatch(str1, str2); // true - * // OR - * regionMatch('hello world', 'hello there', 0, 5) // true - * - * // Not matching regions - * regionMatch('hello world', 'hello there', 6, 11); // false - * - * // Matching regions with different ending points - * const str5 = { str: ' hello world', start: 1, end: 6 }; - * const str6 = { str: 'hello there', start: 0, end: 5 }; - * regionMatch(str5, str6); // true */ function regionMatch(str1: StringRegion | string, str2: StringRegion | string, start?: number, end?: number): boolean { const ZERO_IDX = 0 @@ -54,26 +29,6 @@ function regionMatch(str1: StringRegion | string, str2: StringRegion | string, s /** * Performs a loose comparison of two strings or regions for equality. - * @param {StringRegion | string} str1 - The first string or region to compare. - * @param {StringRegion | string} str2 - The second string or region to compare. - * @param {number} [start] - The starting index of the region in the first string (optional). - * @param {number} [end] - The ending index of the region in the first string (optional). - * @returns {boolean} True if the strings or regions match loosely, false otherwise. - * @example - * // Loose matching identical strings - * looseRegionMatch('hello', 'HeLLo'); // true - * - * // Loose matching identical regions in strings - * const str1 = { str: 'Hello worlD', start: 0, end: 5 }; - * const str2 = { str: 'heLLo there', start: 0, end: 5 }; - * looseRegionMatch(str1, str2); // true - * // OR - * looseRegionMatch('hellO world', 'Hello there', 0, 5) // true - * - * // Loose matching regions with different ending points - * const str5 = { str: ' hellO world', start: 1, end: 6 }; - * const str6 = { str: 'HelLo there', start: 0, end: 5 }; - * looseRegionMatch(str5, str6); // true */ /* eslint-disable-next-line @typescript-eslint/max-params -- locales parameter enhances user accessibility and internationalization support */ function looseRegionMatch( diff --git a/src/reverse.ts b/src/reverse.ts index 6aef04f..5aefa8d 100644 --- a/src/reverse.ts +++ b/src/reverse.ts @@ -1,7 +1,5 @@ /** * Reverses the sequence of characters in given string. - * @example - * reverse('tac'); // 'cat' */ export function reverse(str: string): string { return str.split('').reverse().join('') diff --git a/src/validators.ts b/src/validators.ts index 8634cec..9f9f774 100644 --- a/src/validators.ts +++ b/src/validators.ts @@ -1,10 +1,5 @@ /** * Checks if a string contains only alphabetic characters (A-Z, a-z). - * @param {string} str The string to check. - * @returns {boolean} True if only alphabetic characters, false otherwise. - * @example - * isAlpha("HelloWorld"); // true - * isAlpha("Hello123"); // false */ function isAlpha(str: string): boolean { return /^(?=.*[a-zA-Z])[A-Za-z]+$/.test(str) @@ -12,11 +7,6 @@ function isAlpha(str: string): boolean { /** * Checks if a string contains only alphanumeric characters (A-Z, a-z, 0-9). - * @param {string} str The string to check. - * @returns {boolean} True if only alphanumeric characters, false otherwise. - * @example - * isAlphaNumeric("Hello01"); // true - * isAlphaNumeric("1234567890"); // false */ function isAlphaNumeric(str: string): boolean { return /^(?=.*[a-zA-Z])(?=.*[0-9])[A-Za-z0-9]+$/.test(str)