Socket
Socket
Sign inDemoInstall

ui-number-input

Package Overview
Dependencies
0
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.11 to 0.0.12

22

app/components/ui-number-array-input.js

@@ -28,3 +28,4 @@ import Ember from 'ember';

sum: null,
average: null,
mean: null,
median: null,

@@ -99,6 +100,21 @@ // observers and event handlers

});
samples.sort(function(a,b) {return a-b}); // put into order, lowest to highest
this.set('samples', samples);
this.set('sum', sum);
var average = samples.length === 0 ? null : sum / samples.length;
this.set('average', average);
var sampleSize = samples.length ? samples.length : 0;
this.set('sampleSize', sampleSize);
var median;
var midPoint = Math.floor(sampleSize / 2);
if (sampleSize % 2 === 0 && sampleSize !== 0) {
median = (samples[midPoint] + samples[midPoint - 1]) / 2;
} else if (sampleSize !== 0) {
median = samples[midPoint];
} else {
median = null;
}
this.set('median',median);
var mean = samples.length === 0 ? null : sum / samples.length;
this.set('mean', mean);
this.set('minValue', samples ? samples[0] : null);
this.set('maxValue', samples ? samples[samples.length -1] : null);
});

@@ -105,0 +121,0 @@ }.observes('arrayElements.@each.value'),

2

package.json
{
"name": "ui-number-input",
"version": "0.0.11",
"version": "0.0.12",
"description": "HTML Number input with Bootstrap and mobile friendly features",

@@ -5,0 +5,0 @@ "directories": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc