Skip to content

Commit 4729432

Browse files
authored
refactor: simplify object assignment & use startsWith (#3891)
1 parent 1366ba0 commit 4729432

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/api/transform/vscode-lm-format.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function asObjectSafe(value: any): object {
1818

1919
// Handle pre-existing objects
2020
if (typeof value === "object") {
21-
return Object.assign({}, value)
21+
return { ...value }
2222
}
2323

2424
return {}

src/services/ripgrep/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ rel/path/to/helper.ts
4848
│----
4949
*/
5050

51-
const isWindows = /^win/.test(process.platform)
51+
const isWindows = process.platform.startsWith("win")
5252
const binName = isWindows ? "rg.exe" : "rg"
5353

5454
interface SearchFileResult {

0 commit comments

Comments
 (0)