code: function ToPrimitive(input) {
          var val, valueOf, toStr;
          if (isPrimitive(input)) {
              return input;
          }
          valueOf = input.valueOf;
          if (isCallable(valueOf)) {
              val = valueOf.call(input);
              if (isPrimitive(val)) {
                  return val;
              }
          }
          toStr = input.toString;
          if (isCallable(toStr)) {
              val = toStr.call(input);
              if (isPrimitive(val)) {
                  return val;
              }
          }
          throw new TypeError();
      }
docs: /* replaceable with https://npmjs.com/package/es-abstract ES5.ToPrimitive