You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code was returning "string" (no conversion was done) until version 1.0.5 (included)
import toNumber from 'strnum'
const num = toNumber('0', { leadingZeros: false, skipLike: /.*/ })
console.log(typeof num)
But since 1.1.1 the conversion is done not taking into account 'leadingZeros' and/or 'skipLike' options.
Could someone take a look at it? My code depends on fast-xml-parser (not directly to strnum) what makes it complicated a workaround into my solution. In the meantime I need to set my dependency to the concrete version '1.0.5' of strnum.
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Ideally, setting leading zero to false should not make any change in the result. Because, single zero is a valid number. skiplike option is impacted. That I've fixed. but not released yet.
Let me know if any other observation. So I'll fix them in minor version and release both packages
Hi,
The following code was returning "string" (no conversion was done) until version 1.0.5 (included)
But since 1.1.1 the conversion is done not taking into account 'leadingZeros' and/or 'skipLike' options.
Could someone take a look at it? My code depends on fast-xml-parser (not directly to strnum) what makes it complicated a workaround into my solution. In the meantime I need to set my dependency to the concrete version '1.0.5' of strnum.
Thanks in advance!
The text was updated successfully, but these errors were encountered: