{"ScriptPreparationCode":null,"TestCases":[{"Name":"Lodash omit","Code":"const user = { name: \u0027Banana\u0027, phone: \u00271032012301d0s\u0027, address: \u0027Rua Banana\u0027}\r\nconst userWithoutPhone = _.omit(user, [\u0022phone\u0022]);","IsDeferred":false},{"Name":"Object assign and delete","Code":"const user = { name: \u0027Banana\u0027, phone: \u00271032012301d0s\u0027, address: \u0027Rua Banana\u0027}\r\nconst userWithoutPhone = Object.assign({}, user);\r\ndelete userWithoutPhone[\u0022phone\u0022];","IsDeferred":false},{"Name":"Babel transpile","Code":"const user = { name: \u0027Banana\u0027, phone: \u00271032012301d0s\u0027, address: \u0027Rua Banana\u0027}\r\n// babel output \r\nfunction _objectWithoutProperties(obj, keys) {\r\n var target = {};\r\n for (var i in obj) {\r\n if (keys.indexOf(i) \u003E= 0) continue;\r\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\r\n target[i] = obj[i];\r\n }\r\n return target;\r\n}\r\nconst userWithoutPhone = _objectWithoutProperties(user, [\u0022phone\u0022]);","IsDeferred":false},{"Name":"Modified transpile using reduce","Code":"const user = { name: \u0027Banana\u0027, phone: \u00271032012301d0s\u0027, address: \u0027Rua Banana\u0027}\r\nfunction objectWithoutKeys(obj, keys) {\r\n return Object.keys(obj).reduce((newObject, key) =\u003E {\r\n if (keys.indexOf(key) === -1) newObject[key] = obj[key];\r\n return newObject;\r\n }, {});\r\n}\r\nconst userWithoutPhone = objectWithoutKeys(user, [\u0022phone\u0022]);","IsDeferred":false},{"Name":"Native using destructure","Code":"const user = { name: \u0027Banana\u0027, phone: \u00271032012301d0s\u0027, address: \u0027Rua Banana\u0027}\r\nconst { address, ...userWithoutPhone } = user","IsDeferred":false}]}