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.8 to 0.1.9

2

es6/getNiceTickValues.js

@@ -95,2 +95,4 @@ 'use strict';

}
} else if (value === 0) {
middle = Math.floor((tickCount - 1) / 2);
}

@@ -97,0 +99,0 @@

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

0.1.9 / 2016-04-08
==================
* fix: fix all zeros ticks
0.1.6-beta / 2016-01-28

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

@@ -95,2 +95,4 @@ 'use strict';

}
} else if (value === 0) {
middle = Math.floor((tickCount - 1) / 2);
}

@@ -97,0 +99,0 @@

2

package.json
{
"name": "recharts-scale",
"version": "0.1.8",
"version": "0.1.9",
"description": "Scale of Cartesian Coordinates",

@@ -5,0 +5,0 @@ "main": "lib/index",

@@ -75,2 +75,4 @@ /**

}
} else if (value === 0) {
middle = Math.floor((tickCount - 1) / 2);
}

@@ -77,0 +79,0 @@

@@ -321,2 +321,4 @@ (function webpackUniversalModuleDefinition(root, factory) {

}
} else if (value === 0) {
middle = Math.floor((tickCount - 1) / 2);
}

@@ -323,0 +325,0 @@

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

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.RechartsScale=e():t.RechartsScale=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var u=r[n]={exports:{},id:n,loaded:!1};return t[n].call(u.exports,u,u.exports,e),u.loaded=!0,u.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.getNiceTickValues=e.getTickValues=void 0;var u=r(3),a=n(u),i=r(2),o=n(i);e["default"]={getTickValues:a["default"],getNiceTickValues:o["default"]},e.getTickValues=a["default"],e.getNiceTickValues=o["default"]},function(t,e){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){return t},u=e.__={"@@functional/placeholder":!0},a=function(t){return t===u},i=function(t){return function e(){return 0===arguments.length||1===arguments.length&&a(arguments.length<=0?void 0:arguments[0])?e:t.apply(void 0,arguments)}},o=function f(t,e){return 1===t?e:i(function(){for(var n=arguments.length,o=Array(n),l=0;n>l;l++)o[l]=arguments[l];var c=o.filter(function(t){return t!==u}).length;return c>=t?e.apply(void 0,o):f(t-c,i(function(){for(var t=arguments.length,n=Array(t),u=0;t>u;u++)n[u]=arguments[u];var i=o.map(function(t){return a(t)?n.shift():t});return e.apply(void 0,r(i).concat(n))}))})},l=e.curry=function(t){return o(t.length,t)};e.range=function(t,e){for(var r=[],n=t;e>n;++n)r[n-t]=n;return r},e.map=l(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(t){return e[t]}).map(t)}),e.compose=function(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];if(!e.length)return n;var u=e.reverse(),a=u[0],i=u.slice(1);return function(){return i.reduce(function(t,e){return e(t)},a.apply(void 0,arguments))}},e.reverse=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},e.memoize=function(t){var e=null,r=null;return function(){for(var n=arguments.length,u=Array(n),a=0;n>a;a++)u[a]=arguments[a];return e&&u.every(function(t,r){return t===e[r]})?r:(e=u,r=t.apply(void 0,u))}}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t){var e=f(t,2),r=e[0],n=e[1],u=r,a=n;return r>n&&(u=n,a=r),[u,a]}function a(t,e){if(0>=t)return 0;var r=p["default"].getDigitCount(t),n=t/Math.pow(10,r),u=p["default"].multiply(Math.ceil(n/.05)+e,.05),a=p["default"].multiply(u,Math.pow(10,r));return a}function i(t,e){var r=p["default"].isFloat(t),n=1,u=t;if(r){var a=Math.abs(t);1>a?(n=Math.pow(10,p["default"].getDigitCount(t)-1),u=p["default"].multiply(Math.floor(t/n),n)):a>1&&(u=Math.floor(t))}var i=Math.floor((e-1)/2),o=(0,c.compose)((0,c.map)(function(t){return p["default"].sum(u,p["default"].multiply(t-i,n))}),c.range);return o(0,e)}function o(t,e,r){var n=arguments.length<=3||void 0===arguments[3]?0:arguments[3],u=a((e-t)/(r-1),n),i=void 0;0>=t&&e>=0?i=0:(i=(t+e)/2,i-=i%u);var l=Math.ceil((i-t)/u),f=Math.ceil((e-i)/u),c=l+f+1;return c>r?o(t,e,r,n+1):(r>c&&(f=e>0?f+(r-c):f,l=e>0?l:l+(r-c)),{step:u,tickMin:p["default"].minus(i,p["default"].multiply(l,u)),tickMax:p["default"].sum(i,p["default"].multiply(f,u))})}function l(t){var e=f(t,2),r=e[0],n=e[1],a=arguments.length<=1||void 0===arguments[1]?6:arguments[1],l=Math.max(a,2),s=u([r,n]),d=f(s,2),v=d[0],m=d[1];if(v===m)return i(v,a);var g=o(v,m,l),h=g.step,y=g.tickMin,M=g.tickMax,_=p["default"].rangeStep(y,M+.1*h,h);return r>n?(0,c.reverse)(_):_}var f=function(){function t(t,e){var r=[],n=!0,u=!1,a=void 0;try{for(var i,o=t[Symbol.iterator]();!(n=(i=o.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(l){u=!0,a=l}finally{try{!n&&o["return"]&&o["return"]()}finally{if(u)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();Object.defineProperty(e,"__esModule",{value:!0});var c=r(1),s=r(4),p=n(s);e["default"]=(0,c.memoize)(l)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){if(t[0]===t[1])return(0,o["default"])(t,e);e=Math.max(e,2);var r=(t[1]-t[0])/(e-1),n=(0,a.compose)((0,a.map)(function(e){return t[0]+e*r}),a.range);return n(0,e)}Object.defineProperty(e,"__esModule",{value:!0});var a=r(1),i=r(2),o=n(i);e["default"]=u},function(t,e,r){"use strict";function n(t){return/^([+-]?)\d*\.\d+$/.test(t)}function u(t){var e=Math.abs(t),r=void 0;if(0===t)r=1;else if(1>e)r=Math.floor(Math.log(e)/Math.log(10))+1;else{var n=""+t,u=n.split(".");r=u[0].length}return r}function a(t){var e=t?""+t:"",r=e.split(".");return r.length>1?r[1].length:0}function i(t,e){var r=Math.max(a(t),a(e));return r=Math.pow(10,r),(l(t,r)+l(e,r))/r}function o(t,e){return i(t,-e)}function l(t,e){var r=parseInt((""+t).replace(".",""),10),n=parseInt((""+e).replace(".",""),10),u=a(t)+a(e);return r*n/Math.pow(10,u)}function f(t,e){var r=a(t),n=a(e),u=parseInt((""+t).replace(".",""),10),i=parseInt((""+e).replace(".",""),10);return u/i*Math.pow(10,n-r)}function c(t,e,r){for(var n=t,u=[];e>n;)u.push(n),n=i(n,r);return u}Object.defineProperty(e,"__esModule",{value:!0});var s=r(1),p=(0,s.curry)(function(t,e,r){var n=+t,u=+e;return n+r*(u-n)}),d=(0,s.curry)(function(t,e,r){var n=e-+t;return n=n?n:1/0,(r-t)/n}),v=(0,s.curry)(function(t,e,r){var n=e-+t;return n=n?n:1/0,Math.max(0,Math.min(1,(r-t)/n))});e["default"]={rangeStep:c,isFloat:n,getDigitCount:u,getDecimalDigitCount:a,sum:i,minus:o,multiply:l,divide:f,interpolateNumber:p,uninterpolateNumber:d,uninterpolateTruncation:v}}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.RechartsScale=e():t.RechartsScale=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var u=r[n]={exports:{},id:n,loaded:!1};return t[n].call(u.exports,u,u.exports,e),u.loaded=!0,u.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.getNiceTickValues=e.getTickValues=void 0;var u=r(3),a=n(u),i=r(2),o=n(i);e["default"]={getTickValues:a["default"],getNiceTickValues:o["default"]},e.getTickValues=a["default"],e.getNiceTickValues=o["default"]},function(t,e){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){return t},u=e.__={"@@functional/placeholder":!0},a=function(t){return t===u},i=function(t){return function e(){return 0===arguments.length||1===arguments.length&&a(arguments.length<=0?void 0:arguments[0])?e:t.apply(void 0,arguments)}},o=function f(t,e){return 1===t?e:i(function(){for(var n=arguments.length,o=Array(n),l=0;n>l;l++)o[l]=arguments[l];var c=o.filter(function(t){return t!==u}).length;return c>=t?e.apply(void 0,o):f(t-c,i(function(){for(var t=arguments.length,n=Array(t),u=0;t>u;u++)n[u]=arguments[u];var i=o.map(function(t){return a(t)?n.shift():t});return e.apply(void 0,r(i).concat(n))}))})},l=e.curry=function(t){return o(t.length,t)};e.range=function(t,e){for(var r=[],n=t;e>n;++n)r[n-t]=n;return r},e.map=l(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(t){return e[t]}).map(t)}),e.compose=function(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];if(!e.length)return n;var u=e.reverse(),a=u[0],i=u.slice(1);return function(){return i.reduce(function(t,e){return e(t)},a.apply(void 0,arguments))}},e.reverse=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},e.memoize=function(t){var e=null,r=null;return function(){for(var n=arguments.length,u=Array(n),a=0;n>a;a++)u[a]=arguments[a];return e&&u.every(function(t,r){return t===e[r]})?r:(e=u,r=t.apply(void 0,u))}}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t){var e=f(t,2),r=e[0],n=e[1],u=r,a=n;return r>n&&(u=n,a=r),[u,a]}function a(t,e){if(0>=t)return 0;var r=p["default"].getDigitCount(t),n=t/Math.pow(10,r),u=p["default"].multiply(Math.ceil(n/.05)+e,.05),a=p["default"].multiply(u,Math.pow(10,r));return a}function i(t,e){var r=p["default"].isFloat(t),n=1,u=t;if(r){var a=Math.abs(t);1>a?(n=Math.pow(10,p["default"].getDigitCount(t)-1),u=p["default"].multiply(Math.floor(t/n),n)):a>1&&(u=Math.floor(t))}else 0===t&&(u=Math.floor((e-1)/2));var i=Math.floor((e-1)/2),o=(0,c.compose)((0,c.map)(function(t){return p["default"].sum(u,p["default"].multiply(t-i,n))}),c.range);return o(0,e)}function o(t,e,r){var n=arguments.length<=3||void 0===arguments[3]?0:arguments[3],u=a((e-t)/(r-1),n),i=void 0;0>=t&&e>=0?i=0:(i=(t+e)/2,i-=i%u);var l=Math.ceil((i-t)/u),f=Math.ceil((e-i)/u),c=l+f+1;return c>r?o(t,e,r,n+1):(r>c&&(f=e>0?f+(r-c):f,l=e>0?l:l+(r-c)),{step:u,tickMin:p["default"].minus(i,p["default"].multiply(l,u)),tickMax:p["default"].sum(i,p["default"].multiply(f,u))})}function l(t){var e=f(t,2),r=e[0],n=e[1],a=arguments.length<=1||void 0===arguments[1]?6:arguments[1],l=Math.max(a,2),s=u([r,n]),d=f(s,2),v=d[0],m=d[1];if(v===m)return i(v,a);var g=o(v,m,l),h=g.step,y=g.tickMin,M=g.tickMax,_=p["default"].rangeStep(y,M+.1*h,h);return r>n?(0,c.reverse)(_):_}var f=function(){function t(t,e){var r=[],n=!0,u=!1,a=void 0;try{for(var i,o=t[Symbol.iterator]();!(n=(i=o.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(l){u=!0,a=l}finally{try{!n&&o["return"]&&o["return"]()}finally{if(u)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();Object.defineProperty(e,"__esModule",{value:!0});var c=r(1),s=r(4),p=n(s);e["default"]=(0,c.memoize)(l)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){if(t[0]===t[1])return(0,o["default"])(t,e);e=Math.max(e,2);var r=(t[1]-t[0])/(e-1),n=(0,a.compose)((0,a.map)(function(e){return t[0]+e*r}),a.range);return n(0,e)}Object.defineProperty(e,"__esModule",{value:!0});var a=r(1),i=r(2),o=n(i);e["default"]=u},function(t,e,r){"use strict";function n(t){return/^([+-]?)\d*\.\d+$/.test(t)}function u(t){var e=Math.abs(t),r=void 0;if(0===t)r=1;else if(1>e)r=Math.floor(Math.log(e)/Math.log(10))+1;else{var n=""+t,u=n.split(".");r=u[0].length}return r}function a(t){var e=t?""+t:"",r=e.split(".");return r.length>1?r[1].length:0}function i(t,e){var r=Math.max(a(t),a(e));return r=Math.pow(10,r),(l(t,r)+l(e,r))/r}function o(t,e){return i(t,-e)}function l(t,e){var r=parseInt((""+t).replace(".",""),10),n=parseInt((""+e).replace(".",""),10),u=a(t)+a(e);return r*n/Math.pow(10,u)}function f(t,e){var r=a(t),n=a(e),u=parseInt((""+t).replace(".",""),10),i=parseInt((""+e).replace(".",""),10);return u/i*Math.pow(10,n-r)}function c(t,e,r){for(var n=t,u=[];e>n;)u.push(n),n=i(n,r);return u}Object.defineProperty(e,"__esModule",{value:!0});var s=r(1),p=(0,s.curry)(function(t,e,r){var n=+t,u=+e;return n+r*(u-n)}),d=(0,s.curry)(function(t,e,r){var n=e-+t;return n=n?n:1/0,(r-t)/n}),v=(0,s.curry)(function(t,e,r){var n=e-+t;return n=n?n:1/0,Math.max(0,Math.min(1,(r-t)/n))});e["default"]={rangeStep:c,isFloat:n,getDigitCount:u,getDecimalDigitCount:a,sum:i,minus:o,multiply:l,divide:f,interpolateNumber:p,uninterpolateNumber:d,uninterpolateTruncation:v}}])});
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