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

recharts-scale

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

recharts-scale - npm Package Compare versions

Comparing version 0.1.5-beta to 0.1.6-beta

src/index.js

4

History.md

@@ -0,1 +1,5 @@

0.1.6-beta / 2016-01-28
==================
* fix: remove ramda
0.1.5-beta / 2016-01-13

@@ -2,0 +6,0 @@ ==================

7

package.json
{
"name": "recharts-scale",
"version": "0.1.5-beta",
"version": "0.1.6-beta",
"description": "Scale of Cartesian Coordinates",

@@ -37,6 +37,3 @@ "main": "index.js",

},
"license": "MIT",
"dependencies": {
"ramda": "0.19.0"
}
"license": "MIT"
}

@@ -7,3 +7,3 @@ /**

import R from 'ramda';
import { compose, range, memoize, map, reverse } from './util/utils';
import Arithmetic from './util/arithmetic';

@@ -80,5 +80,5 @@

const fn = R.compose(
R.map(n => { return Arithmetic.sum(middle, Arithmetic.multiply(n - middleIndex, step)); }),
R.range
const fn = compose(
map(n => { return Arithmetic.sum(middle, Arithmetic.multiply(n - middleIndex, step)); }),
range
);

@@ -153,5 +153,5 @@

return min > max ? R.reverse(values) : values;
return min > max ? reverse(values) : values;
}
export default R.memoize(getTickValues);
export default memoize(getTickValues);

@@ -0,3 +1,3 @@

import { compose, map, range } from './util/utils';
import getNiceTickValues from './getNiceTickValues';
import R from 'ramda';

@@ -9,14 +9,14 @@ function getTickValues(domain, tickCount) {

const finalTickCount = Math.max(tickCount, 2);
tickCount = Math.max(tickCount, 2);
const step = (domain[1] - domain[0]) / (finalTickCount - 1);
const step = (domain[1] - domain[0]) / (tickCount - 1);
const fn = R.compose(
R.map(n => (domain[0] + n * step)),
R.range
const fn = compose(
map(n => (domain[0] + n * step)),
range
);
return fn(0, finalTickCount);
return fn(0, tickCount);
}
export default getTickValues;

@@ -6,3 +6,3 @@ /**

*/
import R from 'ramda';
import { curry } from './utils';

@@ -135,3 +135,3 @@ /**

*/
const interpolateNumber = R.curry((a, b, t) => {
const interpolateNumber = curry((a, b, t) => {
const newA = +a;

@@ -150,3 +150,3 @@ const newB = +b;

*/
const uninterpolateNumber = R.curry((a, b, x) => {
const uninterpolateNumber = curry((a, b, x) => {
let diff = b - (+a);

@@ -167,3 +167,3 @@

*/
const uninterpolateTruncation = R.curry((a, b, x) => {
const uninterpolateTruncation = curry((a, b, x) => {
let diff = b - (+a);

@@ -170,0 +170,0 @@

Sorry, the diff of this file is not supported yet

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