https://github.com/harrystevens/-deprecated-arrays
A JavaScript library for manipulating arrays.
https://github.com/harrystevens/-deprecated-arrays
Last synced: 27 days ago
JSON representation
A JavaScript library for manipulating arrays.
- Host: GitHub
- URL: https://github.com/harrystevens/-deprecated-arrays
- Owner: HarryStevens
- License: other
- Created: 2017-06-17T09:46:43.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-06T12:22:12.000Z (about 9 years ago)
- Last Synced: 2025-10-30T11:51:14.836Z (9 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This project is deprecated. Please use [jsz](https://github.com/harrystevens/jsz) instead.
# arrays.js
arrays.js is a Javascript library for manipulating arrays. Javascript has many [built-in methods for manipulating arrays](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array). The functions in this library are meant to supplement those.
To use this library, download `arrays.js` or `arrays.min.js` from the `src` directory and include it in your HTML file as `` or ``.
## API Reference
* [Math](#math)
* [Queries](#queries)
* [Transformations](#transformations)
* [Other](#other)
### Math
Functions for doing math with arrays of numbers.
# arrays.average(array)
Returns the average of an array of numbers.
# arrays.extent(array)
Returns the minimum and maximum values of an array of numbers as the array [min, max].
# arrays.max(array)
Returns the maximum value of an array of numbers.
# arrays.median(array)
Returns the median of an array of numbers.
# arrays.min(array)
Returns the minimum value of an array of numbers.
# arrays.sum(array)
Returns the sum of an array of numbers.
### Queries
Functions for testing arrays for certain properties. Return booleans.
# arrays.is(array)
Tests whether an element is an array. Returns *true* or *false*.
### Transformations
Functions for transforming arrays.
# arrays.shuffle(array)
Shuffles an array.
# arrays.sortNumbers(array)
Sorts an array of numbers.
### Other
Miscellaneous functions.
# arrays.random(array)
Returns a random item from an array.