Suggestions
Instead of using keys such as “Advanced”, “Medium”, and “Basically”, it would be more beneficial and useful as a resource to be able to use custom amounts. Switching the key to a “PlaceValue”, with the “PlaceValue” representing what people would be able to round their number to, would add a lot more functionality.
For example, you would have something like:
N2Abbreviate.Convert(Number,PlaceValue)
You would call
N2Abbreviate.Convert(1234.5,10)
And the result would be “1230”.
Some more examples
N2Abbreviate.Convert(1234.5,100) -- 1200
N2Abbreviate.Convert(1234.5,10) -- 1230
N2Abbreviate.Convert(1234.5,1) -- 1235
N2Abbreviate.Convert(1234.5,.1) -- 1234.5
N2Abbreviate.Convert(1234.5,.01) -- 1234.50
Additional Functionality
Resources are all about usefulness. It is important that they enhance the developer’s experience, and save them time.
If you could specify what these features are, that would be appreciated.
Some functionality that would improve my experience as a programmer would be to return two values when the function is called:
local AbbreviatedNum, LetterNum = N2Abbreviate.Convert(1234.5,1000)
--Would return "AbbreviatedNum = 1000", "LetterNum = 1k"
Having both the exact rounded number, along with the “simplified” number (adding a letter to represent zeroes) would add usefulness.