7 lines
No EOL
234 B
JavaScript
7 lines
No EOL
234 B
JavaScript
var boolString = function(string) {
|
|
return ['true', 'yes', 'enabled', 'enable', 'valid', 'on', '1'].includes(string.toLowerCase());
|
|
}
|
|
|
|
if (typeof module !== 'undefined' && module.exports) {
|
|
module.exports = boolString;
|
|
} |