@des267/315-a2
v1.0.1
Published
A collection of array and object functions. Created for my web application development class.
Downloads
2
Readme
315-a2
A collection of array and object functions.
Purpose
BEWARE: This library was published for learning purposes. It is not intended to be used in professional production. This library was created for the intention of learning to create Javascript modules and upload it as an NPM package.
Usage
Install it:
npm install @des267/315-a2
Require it:
const _ = require('@des267/315-a2');
Call it:
const results = _.functionName()
Documentation
The following functions are currently implemented:
Array functions
countNumberOfArrays(array)
: Counts the number of arrays nested in another arrayfindNaNIndex(array)
: Finds the indexes of each NaN occurrence in an arrayisArrayFactorChain(array)
: Checks if an array of numbers forms a factor chain
Object functions
biggestLoser(matches)
: Finds the name of the participant with the most loser pointsparticipants(matches)
: Finds the name of each participant from an array of match objectswinnersObject(matches)
: Creates an object of participants and the names of those they defeated