mirror of
https://github.com/NaN72dev/kunkun-ext-string-utils.git
synced 2025-04-04 10:16:44 +00:00
feat(trim): add trim end
This commit is contained in:
parent
7d2926a7ec
commit
8c0826fecb
1
build.ts
1
build.ts
@ -12,6 +12,7 @@ const entrypoints = [
|
|||||||
"./src/start-case.ts",
|
"./src/start-case.ts",
|
||||||
"./src/to-upper.ts",
|
"./src/to-upper.ts",
|
||||||
"./src/trim.ts",
|
"./src/trim.ts",
|
||||||
|
"./src/trim-end.ts",
|
||||||
];
|
];
|
||||||
|
|
||||||
async function build() {
|
async function build() {
|
||||||
|
@ -55,9 +55,14 @@
|
|||||||
"cmds": []
|
"cmds": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Trim clipboard text",
|
"name": "Trim the clipboard text",
|
||||||
"main": "dist/trim.js",
|
"main": "dist/trim.js",
|
||||||
"cmds": []
|
"cmds": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Trim the end of clipboard text",
|
||||||
|
"main": "dist/trim-end.js",
|
||||||
|
"cmds": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
11
src/trim-end.ts
Normal file
11
src/trim-end.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { expose } from "@kksh/api/headless";
|
||||||
|
import trimEnd from "lodash/trimEnd";
|
||||||
|
import { BaseExt } from "./base";
|
||||||
|
|
||||||
|
class TrimEndExt extends BaseExt {
|
||||||
|
constructor() {
|
||||||
|
super(trimEnd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
expose(new TrimEndExt());
|
Loading…
x
Reference in New Issue
Block a user