recharts-scale
Advanced tools
Comparing version 0.1.5-beta to 0.1.6-beta
@@ -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 @@ ================== |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15227
0
14
398
- Removedramda@0.19.0
- Removedramda@0.19.0(transitive)