Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jstat-esm

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jstat-esm

Statistical Library for JavaScript

  • 2.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
148
increased by1750%
Maintainers
1
Weekly downloads
 
Created
Source

jStat-esm - JavaScript Statistical Library

This is an ES Version of jStat. Support tree-shaking to minimize bundle size.

npm install jstat-esm
# OR
yarn add jstat-esm

Bundle size

Tree-shakable; Whole module: ~50KB Minified, ~18KB Gzipped + Minified.

Usage

Same as the original jStat.

Using ES6

// Static functions are exported.
// Only import the function you use!
import {gamma, lognormal, tscore} from 'jstat-esm';

// Import jStat constructor, usage is same as before
// keep in mind that importing the consructor means importing everyhing,
// the budle size for this whole module will be ~50KB without GZIP
import {jStat} from 'jstat-esm';
// or 
import jStat from 'jstat-esm';

Using CommonJS

// Tree shaking on commonjs is limited on webpack. Using ES6 is recommanded.
const {jStat} = require('jstat-esm');
const {gamma, lognormal, tscore} = require('jstat-esm');

Using UMD build in a Browser

<script src="node_modules/jstat-esm/dist/jstat.min.js"></script>

<script>
// jStat is available globally
jStat.zeros(2);
// returns [[0,0],[0,0]]

jStat().ones(2);
// returns jStat([[0,0],[0,0]])
...
</script>

Internal changes compared to the original jStat

  • jStat.extend is removed.
  • Reworked tests.
  • Reworked build process.
  • Documentation breaks now. Rethinking a new way to document.

FAQs

Package last updated on 07 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc