effect icon indicating copy to clipboard operation
effect copied to clipboard

Add Number.fromString and Number.fromBigInt

Open jessekelly881 opened this issue 2 years ago • 1 comments

What is the problem this feature would solve?

There is currently no wrapper for Number.parseFloat in the lib without reaching for Schema which is overkill for some cases.

What is the feature you are proposing to solve the problem?

Add safe implementations(i.e. returning Option) of Number.fromString, Number.fromBigInt. They are useful by themselves and can be used by Schema.numberFromString instead of handling the parsing logic there.

What alternatives have you considered?

No response

jessekelly881 avatar Dec 12 '23 11:12 jessekelly881

Also, BigInt.fromString, BigInt.fromNumber

jessekelly881 avatar Dec 12 '23 11:12 jessekelly881