T.J. Crowder (2017-08-14T06:43:57.000Z)
On Mon, Aug 14, 2017 at 7:33 AM, Naveen Chawla <naveen.chwl at gmail.com>
wrote:
> I've never been concerned about needing to allow "toString" etc.
> as valid cache keys, so it's never been an issue for me so far.
> However, if I did in future, I would honestly look to delete them
> from the Object.prototype in my application since I never use
> anything in there, as long as I knew it was safe to do so.

I very much doubt it's safe; if you're using **any** library, I expect it
would blow up fairly quickly.

It's also not remotely necessary. Just create an object with no prototype:
`Object.create(null)`.

-- T.J. Crowder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170814/3a281f1c/attachment.html>
tj.crowder at farsightsoftware.com (2017-08-14T06:46:12.662Z)
On Mon, Aug 14, 2017 at 7:33 AM, Naveen Chawla <naveen.chwl at gmail.com> wrote:

> I've never been concerned about needing to allow "toString" etc.
> as valid cache keys, so it's never been an issue for me so far.
> However, if I did in future, I would honestly look to delete them
> from the Object.prototype in my application since I never use
> anything in there, as long as I knew it was safe to do so.

I very much doubt it's safe; if you're using **any** library, I expect it
would blow up fairly quickly.

It's also not remotely necessary. Just create an object with no prototype:
`Object.create(null)`.

-- T.J. Crowder