Skip to content

Commit

Permalink
fix: index_of_string - accept number
Browse files Browse the repository at this point in the history
  • Loading branch information
gnlow committed Dec 30, 2023
1 parent b63afe4 commit e4dfe1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -917,8 +917,8 @@ export class Entry {
Math.max(from, to),
)
}
index_of_string(where: string, what: string) {
return where.indexOf(what) + 1
index_of_string(where: string | number, what: string) {
return String(where).indexOf(what) + 1
}
replace_string(where: string, from: string, to: string) {
return where.replaceAll(from, to)
Expand Down

0 comments on commit e4dfe1e

Please sign in to comment.