anthony1nguyen1-a2
v1.0.0
Published
Functions used on arrays to calculate certain instances like finding NaN, factor chain, number of arrays in array. Used on objects to find all participants, winners and losers, and biggest loser.
Downloads
2
Maintainers
Readme
Assignment 2
A group of functions used on arrays and objects.
Purpose
BEWARE: This library was published for learning purposes. It is not intended for use in production-grade software. Used on array and objects.
Usage
Install it:
npm install Anthony1Nguyen1-A2>
Require it:
const _ = require('Anthony1Nguyen1-A2');
Call it:
const results = _.findNaNIndex([2, NaN, 8, 16, 32]) // => [1]
Documentation
The following functions are currently implemented:
function1(findNaNIndex)
: Find all the indexes where NaN is found in a given array of numbers and NaNfunction2(isArrayFactorChain)
: Return true or false if an array is a factor chain or notfunction3(countNumberOfArrays)
: Return the count for the number of arrays inside a given arrayfunction4(participants)
: Returns an array of all the unique player namesfunction5(winnersObject)
: Returns an object which lists each participant, and a list of who they've beaten (unique)function6(biggestLoser)
: Returns the loser with the highest amount of loser points