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.

index.js 325B

123456789101112131415161718
  1. /*!
  2. * repeat-element <https://github.com/jonschlinkert/repeat-element>
  3. *
  4. * Copyright (c) 2015-present, Jon Schlinkert.
  5. * Licensed under the MIT license.
  6. */
  7. 'use strict';
  8. module.exports = function repeat(ele, num) {
  9. var arr = new Array(num);
  10. for (var i = 0; i < num; i++) {
  11. arr[i] = ele;
  12. }
  13. return arr;
  14. };