subhasmitalmg-react-spreadsheet-import
Version:
React spreadsheet import for xlsx and csv files with column matching and validation steps
19 lines (15 loc) • 427 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
const booleanWhitelist = {
yes: true,
no: false,
true: true,
false: false,
};
const normalizeCheckboxValue = (value) => {
if (value && value.toLowerCase() in booleanWhitelist) {
return booleanWhitelist[value.toLowerCase()];
}
return false;
};
exports.normalizeCheckboxValue = normalizeCheckboxValue;