Simple Statistics

Node 和浏览器 javascript 的简单统计。「simple statistics for node & browser javascript」

Github星跟蹤圖

Simple Statistics

A JavaScript implementation of descriptive, regression, and inference statistics.

Circle CI
codecov.io
npm version
Greenkeeper badge

Implemented in literate JavaScript with no dependencies, designed to work
in all modern browsers (including IE) as well as in node.js.

Installation

  • I'm using Node.js, Webpack, Browserify, Rollup, or another module bundler,
    and install packages from npm.
    • First, install the simple-statistics module, using npm install simple-statistics,
      then include the code with require or import:
    • I use the require function to use modules in my project. (most likely)
      • When you use require, you have the freedom to assign the module to any
        variable name you want, but you need to specify the module's name exactly:
        in this case, 'simple-statistics'. The require method returns an object
        with all of the module's methods attached to it. var ss = require('simple-statistics')
    • I use import to use modules in my project. I'm probably using Babel, @std/esm, Webpack, or Rollup.
      • Import all functions under the ss object: import * as ss from 'simple-statistics'
        Include a specific named export: import {min} from 'simple-statistics'
        Simple statistics has only named exports for ES6.
  • I'm not using a module bundler. I'm writing a web page, and want to include
    simple-statistics using a script tag.
    • I want to support all browsers
      • When you use simple-statistics from a script tag, you don't get to choose
        the variable name it is assigned to: simple-statistics will always become
        available globally as the variable ss. You can reassign this variable to
        another name if you want to, but doing so is optional.
        <script src='https://unpkg.com/simple-statistics@7.0.2/dist/simple-statistics.min.js'>
        </script>
        
    • I want to use ES6 modules in a browser and I'm willing to only support new browsers to do it
      • This module works great with the ?module query parameter of unpkg. If you
        specify type='module' in your script tag, you'll be able to import simple-statistics
        directly - through index.js and with true ES6 import syntax and behavior.
        <script type='module'>
        import {min} from "https://unpkg.com/simple-statistics@7.0.2/index.js?module"
        console.log(min([1, 2, 3]))
        </script>
        
        This feature is still experimental in unpkg and very bleeding-edge.

主要指標

概覽
名稱與所有者simple-statistics/simple-statistics
主編程語言JavaScript
編程語言JavaScript (語言數: 3)
平台
許可證ISC License
所有者活动
創建於2012-02-08 18:29:54
推送於2025-06-08 19:42:28
最后一次提交
發布數67
最新版本名稱v7.8.3 (發布於 2023-02-12 22:09:35)
第一版名稱v0.0.1 (發布於 )
用户参与
星數3.5k
關注者數56
派生數229
提交數892
已啟用問題?
問題數191
打開的問題數19
拉請求數377
打開的拉請求數6
關閉的拉請求數190
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?