truish
Version:
A lightweight utility to determine the truth value of strings
61 lines (59 loc) • 677 B
JavaScript
export const TRUTHY_WORDS = [
"y",
"yes",
"on",
"ok",
"okay",
"sure",
"true",
"yep",
"yeah",
"correct",
"agreed",
"approve",
"confirm",
"positive",
"yup",
"ya",
"absolutely",
"indeed",
"right",
"1",
"+",
":)",
];
export const FALSY_WORDS = [
"n",
"no",
"off",
"nope",
"nah",
"false",
"negative",
"never",
"not",
"reject",
"deny",
"decline",
"disagree",
"0",
"-",
"",
":(",
];
export const INDETERMINANT_WORDS = [
"maybe",
"perhaps",
"possibly",
"sometimes",
"uncertain",
"unsure",
"might",
"could",
"not sure",
"not certain",
"indeterminate",
"undecided",
"?",
":|",
];