-
Notifications
You must be signed in to change notification settings - Fork 0
parse
Subhajit Sahu edited this page Jul 19, 2022
·
19 revisions
Convert a string to boolean.
parse(s)
// s: a string
const xboolean = require('extra-boolean');
xboolean.parse('1');
xboolean.parse('truthy');
xboolean.parse('not off');
// → true
xboolean.parse('not true');
xboolean.parse('inactive');
xboolean.parse('disabled');
// → false