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.array.of.js 832B

123456789101112131415161718192021222324
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var fails = require('../internals/fails');
  4. var createProperty = require('../internals/create-property');
  5. var ISNT_GENERIC = fails(function () {
  6. function F() { /* empty */ }
  7. // eslint-disable-next-line es/no-array-of -- required for testing
  8. return !(Array.of.call(F) instanceof F);
  9. });
  10. // `Array.of` method
  11. // https://tc39.es/ecma262/#sec-array.of
  12. // WebKit Array.of isn't generic
  13. $({ target: 'Array', stat: true, forced: ISNT_GENERIC }, {
  14. of: function of(/* ...args */) {
  15. var index = 0;
  16. var argumentsLength = arguments.length;
  17. var result = new (typeof this == 'function' ? this : Array)(argumentsLength);
  18. while (argumentsLength > index) createProperty(result, index, arguments[index++]);
  19. result.length = argumentsLength;
  20. return result;
  21. }
  22. });