Skip to content

Commit

Permalink
fix issues again
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrkulpinski committed Apr 26, 2024
1 parent cbecba4 commit a979e7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/numbers/numbers.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from "bun:test"

import { getRandomNumber, keepNumberInRange, parseNumericValue } from "./numbers"
import { keepNumberInRange, parseNumericValue } from "./numbers"

describe("keepNumberInRange", () => {
it("returns the same value if no range is specified", () => {
Expand Down
4 changes: 2 additions & 2 deletions src/random/random.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const getRandomNumber = (min: number, max: number) => {
*/
export const getRandomProperty = <T>(obj: Record<string, T>): T => {
const keys = Object.keys(obj)
const randomKey = keys[Math.floor(keys.length * Math.random())]
const randomKey = keys[Math.floor(keys.length * Math.random())]!

return obj[randomKey]
return obj[randomKey]!
}

0 comments on commit a979e7d

Please sign in to comment.