refactor: simplify object assignment & use startsWith (#3891)

This commit is contained in:
Noritaka Kobayashi 2025-05-24 15:48:55 +09:00 • committed by GitHub
parent 1366ba0115
commit 472943281f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@ function asObjectSafe(value: any): object {
// Handle pre-existing objects
if (typeof value === "object") {
return Object.assign({}, value)
return { ...value }
}
return {}

View file

@ -48,7 +48,7 @@ rel/path/to/helper.ts
│----
*/
const isWindows = /^win/.test(process.platform)
const isWindows = process.platform.startsWith("win")
const binName = isWindows ? "rg.exe" : "rg"
interface SearchFileResult {