I didn't see any example of reverting human-readable file size to an integer
There're a lot of functions which help to convert file size to human readble, such as: 1024 bytes -> 1KB. Here is an question about this: Converting file size in bytes to human-readable string
But I didn't see anywhere to support revert the process, such as: 1Kb -> 1024.
I recieved data from backend API, and it returns, for example 10MB
, and I want to convert this String to an integer (bytes) to compare file sizes of multiple files. How to I do this in Javascript?