simple statistics for node & browser javascript
A JavaScript implementation of descriptive, regression, and inference statistics.
Implemented in literate JavaScript with no dependencies, designed to work
in all modern browsers (including IE) as well as in node.js.
simple-statistics
module, using npm install simple-statistics
,require
function to use modules in my project. (most likely)require
, you have the freedom to assign the module to anyrequire
method returns an object
- var ss = require(‘simple-statistics’)
import
to use modules in my project. I’m probably using Babel, @std/esm
, Webpack, or Rollup.
- import * as ss from ‘simple-statistics’
- import {min} from ‘simple-statistics’
ss
. You can reassign this variable to
<script src='https://unpkg.com/simple-statistics@7.8.8/dist/simple-statistics.min.js'>
</script>
?module
query parameter of unpkg. If youtype='module'
in your script tag, you’ll be able to import simple-statisticsindex.js
and with true ES6 import syntax and behavior.This feature is still experimental in unpkg and very bleeding-edge.
<script type='module'>
import {min} from "https://unpkg.com/simple-statistics@7.8.8/index.js?module"
console.log(min([1, 2, 3]))
</script>