{"ScriptPreparationCode":null,"TestCases":[{"Name":"for in","Code":"const TEXT_PROPS_TO_BLOCK = [\r\n \u0027display\u0027,\r\n \u0027textColor\u0027,\r\n \u0027verticalAlign\u0027,\r\n \u0027className\u0027,\r\n \u0027style\u0027,\r\n];\r\n\r\nconst propsToTest = { \r\n \u0022aria-label\u0022: \u0022ordered list\u0022, \r\n \u0022data-test\u0022: \u0022something\u0022,\r\n \u0022textColor\u0022: \u0022foo\u0022,\r\n \u0022className\u0022: \u0022bar\u0022\r\n}\r\n\r\nlet allowedProps = {};\r\nfor (let p in propsToTest) {\r\n if (!TEXT_PROPS_TO_BLOCK.includes(p)) {\r\n allowedProps = {[p]: propsToTest[p], ...allowedProps};\r\n }\r\n}","IsDeferred":false},{"Name":"reduce","Code":"const TEXT_PROPS_TO_BLOCK = [\r\n \u0027display\u0027,\r\n \u0027textColor\u0027,\r\n \u0027verticalAlign\u0027,\r\n \u0027className\u0027,\r\n \u0027style\u0027,\r\n];\r\n\r\nconst propsToTest = { \r\n \u0022aria-label\u0022: \u0022ordered list\u0022, \r\n \u0022data-test\u0022: \u0022something\u0022,\r\n \u0022textColor\u0022: \u0022foo\u0022,\r\n \u0022className\u0022: \u0022bar\u0022\r\n}\r\n\r\nconst newList = Object.keys(propsToTest).reduce((newObj, key) =\u003E {\r\n if (!TEXT_PROPS_TO_BLOCK.includes(key)) {\r\n newObj[key] = propsToTest[key];\r\n }\r\n return newObj;\r\n}, {});","IsDeferred":false},{"Name":"pick","Code":"const TEXT_PROPS_TO_BLOCK = [\r\n \u0027display\u0027,\r\n \u0027textColor\u0027,\r\n \u0027verticalAlign\u0027,\r\n \u0027className\u0027,\r\n \u0027style\u0027,\r\n];\r\n\r\nconst propsToTest = { \r\n \u0022aria-label\u0022: \u0022ordered list\u0022, \r\n \u0022data-test\u0022: \u0022something\u0022,\r\n \u0022textColor\u0022: \u0022foo\u0022,\r\n \u0022className\u0022: \u0022bar\u0022\r\n}\r\n\r\n_.pick(\r\n propsToTest,\r\n Object.keys(propsToTest).filter(prop =\u003E !TEXT_PROPS_TO_BLOCK.includes(prop))\r\n);","IsDeferred":false},{"Name":"filter and fromPairs","Code":"const TEXT_PROPS_TO_BLOCK = [\r\n \u0027display\u0027,\r\n \u0027textColor\u0027,\r\n \u0027verticalAlign\u0027,\r\n \u0027className\u0027,\r\n \u0027style\u0027,\r\n];\r\n\r\nconst propsToTest = { \r\n \u0022aria-label\u0022: \u0022ordered list\u0022, \r\n \u0022data-test\u0022: \u0022something\u0022,\r\n \u0022textColor\u0022: \u0022foo\u0022,\r\n \u0022className\u0022: \u0022bar\u0022\r\n}\r\n\r\n_.fromPairs(Object.entries(propsToTest).filter(([prop, value]) =\u003E !TEXT_PROPS_TO_BLOCK.includes(prop)))","IsDeferred":false}]}