main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
386 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var $TypeError = require('es-errors/type');
|
---|
4 |
|
---|
5 | var isArray = require('isarray');
|
---|
6 |
|
---|
7 | /** @type {import('.')} */
|
---|
8 | module.exports = function safePushApply(target, source) {
|
---|
9 | if (!isArray(target)) {
|
---|
10 | throw new $TypeError('target must be an array');
|
---|
11 | }
|
---|
12 | for (var i = 0; i < source.length; i++) {
|
---|
13 | target[target.length] = source[i]; // eslint-disable-line no-param-reassign
|
---|
14 | }
|
---|
15 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.