Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lafikl/median
A small module for node and browser to calculate median.
https://github.com/lafikl/median
Last synced: about 1 month ago
JSON representation
A small module for node and browser to calculate median.
- Host: GitHub
- URL: https://github.com/lafikl/median
- Owner: lafikl
- License: mit
- Created: 2013-12-12T18:06:42.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-15T11:23:39.000Z (almost 11 years ago)
- Last Synced: 2024-09-22T05:09:37.193Z (about 2 months ago)
- Language: JavaScript
- Size: 453 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Median
=========A small module for node and browser to calculate median.
## Install
**NPM**
```
$ npm install median
```or you can download the repo and use `median.js`
## Usage
**Node.js**
```js
var median = require('median')
var arr = [1, 15, 200, 30]
var value = median(arr)console.log("median value is " + value)
```
**Browser**
```js
var arr = [1, 15, 200, 30]
var value = window.median(arr)console.log("median value is " + value)
```