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

@easyv/utils

Package Overview
Dependencies
Maintainers
9
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@easyv/utils - npm Package Compare versions

Comparing version 0.0.25 to 0.0.26

29

lib/common/utils.js

@@ -74,17 +74,22 @@ "use strict";

return fmt;
}
} // export function getTicksOfAxis(domain, count) {
// var len = domain.length;
// let ticksCount = Math.round(count);
// if (ticksCount < 2 || ticksCount > len) return domain;
// let newDomain = [];
// for (let i = 0; i < ticksCount; i++) {
// let a = Math.round(((len - 1) / (ticksCount - 1)) * i);
// newDomain.push(domain[a]);
// }
// return newDomain;
// }
function getTicksOfAxis(domain, count) {
function getTicksOfAxis(domain, ticksCount) {
var len = domain.length;
var ticksCount = Math.round(count);
if (ticksCount < 2 || ticksCount > len) return domain;
var newDomain = [];
for (var i = 0; i < ticksCount; i++) {
var _a = Math.round((len - 1) / (ticksCount - 1) * i);
newDomain.push(domain[_a]);
}
return newDomain;
var step = Math.floor((len - ticksCount) / (ticksCount - 1));
return domain.filter(function (d, i) {
return i % (step + 1) === 0;
});
}

@@ -91,0 +96,0 @@

{
"name": "@easyv/utils",
"version": "0.0.25",
"version": "0.0.26",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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