Support for converting possible boolean strings to actual boolean values
vikneswaran20 opened this issue · 1 comments
vikneswaran20 commented
Support for converting the boolean type of string to actual boolean
Converting the logical booelan strings to respective booleans
v.boolean('true');
// => true
v.boolean('1');
// => true
v.boolean('yes');
// => true
v.boolean('false');
// => false
v.boolean('0');
// => false
v.boolean('no');
// => false
The comparisons are case insensitive
The list of truth values we can consider -> 'true', true, '1', 1, 'yes', 'on'
If this is fine I will submit a pull request for this function implementation.
panzerdp commented
Thanks for idea.
For now I'm not interested in such a function because I see it has limited usage.