Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

es.number.to-precision.js 757B

123456789101112131415161718192021222324
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var fails = require('../internals/fails');
  4. var thisNumberValue = require('../internals/this-number-value');
  5. var nativeToPrecision = 1.0.toPrecision;
  6. var FORCED = fails(function () {
  7. // IE7-
  8. return nativeToPrecision.call(1, undefined) !== '1';
  9. }) || !fails(function () {
  10. // V8 ~ Android 4.3-
  11. nativeToPrecision.call({});
  12. });
  13. // `Number.prototype.toPrecision` method
  14. // https://tc39.es/ecma262/#sec-number.prototype.toprecision
  15. $({ target: 'Number', proto: true, forced: FORCED }, {
  16. toPrecision: function toPrecision(precision) {
  17. return precision === undefined
  18. ? nativeToPrecision.call(thisNumberValue(this))
  19. : nativeToPrecision.call(thisNumberValue(this), precision);
  20. }
  21. });