-
-
Notifications
You must be signed in to change notification settings - Fork 453
Closed
Description
Hi
Probably an edge case but I have some data that is a number but needs to be treated as a string and also data that is a number but needs to remain as a number. So I do need parseNumbers: true.
example postcode=01220
.parse returns { postcode : 1220 }
Which is now invalid.What I would like is { postcode : '01220' }
Another example is telephone number
telephone=012345678
.parse returns { telephone: 12345678 } would like { telephone: '012345678' }
What would be nice is the ability to prefix the value so that it is treated as a string and the prefix stripped ?
option {parseNumbers: true, treatAsTextPrefix: '<'}
telephone=<012345678 would result in { telephone: '012345678'
Or is there some other way to achieve this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels