From a0d408ea3d7fca7333d625ecbec27c4e0e3903d1 Mon Sep 17 00:00:00 2001 From: Dan Wolff Date: Mon, 5 Feb 2018 23:47:57 +0100 Subject: [PATCH] `toString()` and `valueOf()` rephrasing for accuracy --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9b650f88..4e30af25 100644 --- a/README.md +++ b/README.md @@ -1113,9 +1113,10 @@ disable the Uglify `compress` option and just use `mangle`. ### Compiler assumptions -To allow for better optimizations, the compiler makes various assumptions. +To allow for better optimizations, the compiler makes various assumptions: -- `.toString()` and `.valueOf()` have not been overridden, and don't have side effects. +- `.toString()` and `.valueOf()` don't have side effects, and for built-in + objects they have not been overridden. - `undefined`, `NaN` and `Infinity` have not been externally redefined. - `arguments.callee`, `arguments.caller` and `Function.prototype.caller` are not used. - The code doesn't expect the contents of `Function.prototype.toString()` or