Added examples of parsing with esprima and recast.
Target is remove all && clauses that contains check for equality some field of argument object for the any literal. Also it is need to return key - value pairs that algorithm found.
Esprima can parse to AST but can not create source back from changed tree.
Recast can do that because it saves information about locations(row and column of start and end) in the ast that it produces.
Added examples of parsing with esprima and recast. Target is remove all && clauses that contains check for equality some field of argument object for the any literal. Also it is need to return key - value pairs that algorithm found. Esprima can parse to AST but can not create source back from changed tree. Recast can do that because it saves information about locations(row and column of start and end) in the ast that it produces.