A simple module to get porperties of an array

Overview

statistics_summary

A simple module to get statistical porperties of an array. Currently the possible properties are mean, stdev and variance.

You can test the function using the follwing example via CLI.

deno run --allow-net https://deno.land/x/[email protected]/mod-test.ts

or you can implement using the following usage examples:

import { ArrayProperties } from "https://deno.land/x/[email protected]/mod-test.ts";

const randomNumbers: number[] = [1, 10, 2, 9, 3, 8, 4, 7, 5, 6]

// Console log every function with sample array
console.log(ArrayProperties.getMean(randomNumbers))
console.log(ArrayProperties.getVariancePopulation(randomNumbers))
console.log(ArrayProperties.getVarianceSample(randomNumbers))
console.log(ArrayProperties.getStdevPopulation(randomNumbers))
console.log(ArrayProperties.getStdevSample(randomNumbers))

// or get the full summary 
// use true to specifiy the array as a sample or false for the population

ArrayProperties.printSummary(randomNumbers, true)

The module is covered by unit-tests which you can see in "./src/ArrayProperties.spec.ts". You can run them by:

deno run --allow-net https://deno.land/x/[email protected]/src/getHighestCommonDenominator.spec.ts
You might also like...

we learn the whole concept of JS including Basics like Object, Functions, Array etc. And Advance JS - Understanding DOMs, JQuery, Ajax, Prototypes etc.

JavaScript-for-Complete-Web Development. we learn the whole concept of JS including Basics like Object, Functions, Array etc. And Advance JS - Underst

Jul 22, 2022

Fix for Object.keys, which normally just returns an array of strings, which is not good when you care about strong typing

Fix for Object.keys, which normally just returns an array of strings, which is not good when you care about strong typing

Welcome to ts-object-keys 👋 Fix for Object.keys, which normally just returns an array of strings, which is not good when you care about strong typing

Jul 4, 2022

An extension of the Map class with more Array-like features.

BetterMap An extension of the Map class with more Array-like features. Installation There ain't no installation. It's a Deno module. Usage import { Be

Oct 24, 2022

jsonrawtoxlsx is library to convert json raw (array) into xlsx file

jsonrawtoxlsx is library to convert json raw (array) into xlsx file

Welcome to jsonrawtoxlsx 👋 ✨ What is jsonrawtoxlsx? jsonrawtoxlsx is library to convert json raw (array) into xlsx file ⚡️ Installation using npm npm

Dec 23, 2022

🎲 Extract one or more random elements from a weighted array (aka loot table or gacha)

wrand Extract one or more random elements from a weighted array. const items = [ { original: "Bronze", weight: 20 }, { original: "Silver", weight:

Dec 2, 2022

Very tiny function that checks if an object/array/value is shaped like another, with TypeScript type refining.

@suchipi/has-shape Very tiny (~200B before minification/compression) function that checks if an object/array/value is shaped like another, with TypeSc

Aug 13, 2022

simulates MEV activity from an array of unique searchers; used for testing infra

simulates MEV activity from an array of unique searchers; used for testing infra

mev-flood the game Call bid, placing a bet by setting value, and send the highest bid (which may be in addition to others' bids in the block) before c

Jan 9, 2023

VSCode extension to paste text as a string array

VSCode extension to paste text as a string array

VSCode extension to paste text as a string array. This is useful when copying command line into launch.json args

Dec 28, 2022

Format an array of data objects as a textual table.

st2 st2 is string-table refactored in TypeScirpt with more enhancements: add type information, then it can be used in modern IDE like vscode to work w

Sep 10, 2022
Releases(0.2)
Owner
null
Fundamentos, estruturas, função, objeto, array e etc...

JavaScript Fundamentos, estruturas, função, array e etc... Atividades praticas detalhadas e comentadas para todo mundo entender cada tag, bons estudos

Leonardo Madeira 6 Feb 27, 2022
Complete JavaScipt Array methods Cheatsheet 🚀

Javascript Array Cheatsheet ?? Click to download ☝ Important ?? There is no way this is perfect or include all the methods. I'll try to fix/add more m

Ayush 91 Dec 7, 2022
Draft specification for a proposed Array.fromAsync method in JavaScript.

Array.fromAsync for JavaScript ECMAScript Stage-1 Proposal. J. S. Choi, 2021. Specification available Polyfill available Why an Array.fromAsync method

Ecma TC39 126 Dec 14, 2022
Analisador de números utilizando Array JavaScript com Html 5 e CSS 3

Olá pessal, tudo bem? :D Esse site foi desenvolvido para analisar números armazenados em um array chamado "dados[]". Temos dois botões um input e uma

Yuri Willian 0 Jan 6, 2022
Hierarchical Converter for Array of Objects

Conversor Hierárquico para Array de Objetos - Hierarchical Converter to Array of Objects Docker-compose Cria a interface network e containers indicado

Victor Vinícius Eustáquio de Almeida 2 Jan 27, 2022
🧰 Javascript array-like containers for multithreading

بسم الله الرحمن الرحيم Struct Vec ?? Javascript array-like containers for multithreading Efficiently communicating between js workers is a pain becaus

Mostafa Elbannan 19 Jun 23, 2022
Useful for managing a wrapping index for an array of items.

use-wrapping-index Useful for managing a wrapping index for an array of items. Usage import useWrappingIndex from "@alexcarpenter/use-wrapping-index";

Alex Carpenter 4 Dec 9, 2022
Converts an iterable, iterable of Promises, or async iterable into a Promise of an Array.

iterate-all A utility function that converts any of these: Iterable<T> Iterable<Promise<T>> AsyncIterable<T> AsyncIterable<Promise<T>> Into this: Prom

Lily Scott 8 Jun 7, 2022
Práctica sobre métodos de array

Práctica de Arrays Este es el repositorio de acompañamiento de este stream. Si querés saber más sobre Arrays podes visitar la MDN en su artículo de pr

Gonzalo Pozzo 41 Dec 28, 2022
Small, typed, dependency free tool to round corners of 2d-polygon provided by an array of { x, y } points.

round-polygon Small, typed, dependency-free tool to round corners of 2d-polygon provided by an array of { x, y } points. The algorithm prevents roundi

Sergey Borovikov 10 Nov 26, 2022