@bouko/ts 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/utils/formatters.js
CHANGED
|
@@ -16,3 +16,8 @@ export const cleanStr = (str) => str
|
|
|
16
16
|
.replace(/[^\w!?.)]+$/g, "") // trailing junk
|
|
17
17
|
.replace(/\s+/g, " ") // collapse spaces
|
|
18
18
|
.trim();
|
|
19
|
+
export const stripStr = (str, noise) => {
|
|
20
|
+
for (const word of noise)
|
|
21
|
+
str = str.replace(new RegExp(word, "gi"), "");
|
|
22
|
+
return cleanStr(str.replace("()", ""));
|
|
23
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
|
|
3
3
|
"name": "@bouko/ts",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.2",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"license": "MIT",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
},
|
|
21
21
|
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@bouko/ts": "^0.3.5",
|
|
24
23
|
"chalk": "^5.6.0",
|
|
25
24
|
"zod": "^4.3.5"
|
|
26
25
|
},
|