<commit_before>/**
 * @module Data
 * @submodule Array Functions
 * @for p5
 * @requires core
 */

'use strict';

var p5 = require('../core/core');

/**
 * Adds a value to the end of an array. Extends the length of
 * the array by one. Maps to Array.push().
 *
 * @method append
 * @param {Array} array Array to append
 * @param {any} value to be added to the Array
 * @example
 * <div class='norender'><code>
 * function setup() {
 *   var myArray = ['Mango', 'Apple', 'Papaya'];
 *   print(myArray); // ['Mango', 'Apple', 'Papaya']
 *
 *   append(myArray, 'Peach');
 *   print(myArray); // ['Mango', 'Apple', 'Papaya', 'Peach']
 * }
 * </code></div>
 */
p5.prototype.append = function(array, value) {
  array.push(value);
  return array;
};

/**
 * Copies an array (or part of an array) to another array. The src array is
 * copied to the dst array, beginning at the position specified by
 * srcPosition and into the position specified by dstPosition. The number of
 * elements to copy is determined by length. Note that copying values
 * overwrites existing values in the destination array. To append values
 * instead of overwriting them, use concat().<commit_msg>example of @deprectated attribute usage<commit_after>/**
 * @module Data
 * @submodule Array Functions
 * @for p5
 * @requires core
 */

'use strict';

var p5 = require('../core/core');

/**
 * Adds a value to the end of an array. Extends the length of
 * the array by one. Maps to Array.push().
 *
 * @method append
 * @deprecated Use <code class='language-javascript'>array.push(value)</code> instead.
 * @param {Array} array Array to append
 * @param {any} value to be added to the Array
 * @example
 * <div class='norender'><code>
 * function setup() {
 *   var myArray = ['Mango', 'Apple', 'Papaya'];
 *   print(myArray); // ['Mango', 'Apple', 'Papaya']
 *
 *   append(myArray, 'Peach');
 *   print(myArray); // ['Mango', 'Apple', 'Papaya', 'Peach']
 * }
 * </code></div>
 */
p5.prototype.append = function(array, value) {
  array.push(value);
  return array;
};

/**
 * Copies an array (or part of an array) to another array. The src array is
 * copied to the dst array, beginning at the position specified by
 * srcPosition and into the position specified by dstPosition. The number of
 * elements to copy is determined by length. Note that copying values
 * overwrites existing values in the destination array. To append values
 * instead of overwriting them, use concat().
{'fraction_non_alphanumeric': 0.1420988158432013, 'fraction_numerical': 0.002449979583503471, 'mean_word_length': 3.6934865900383143, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4130374', 'n_tokens_mistral': 762, 'n_tokens_neox': 747, 'n_words': 296}