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

@mishguru/interpolate

Package Overview
Dependencies
Maintainers
10
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mishguru/interpolate

Estimates where data should lie by interpolating through a list of points

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
10
Weekly downloads
 
Created
Source

interpolate

Interpolate takes a list of points and finds the best guess of where data would lie given the mean of the Y value using a 'best guess' method.

Interpolate works by taking your points, parsing them from the right, and finding the first place where the average Y fits between two points. It is really only useful for very specific circumstances although Pull Requests are welcome if you would like to see this functionality extended.

Installation

npm install @mishguru/interpolate

Usage

The best way to figure out how to use this library is to look at src/index.spec.js file.

import interpolate from '@mishguru/interpolate'

const points = [{ x: 1, y: 2 }, { x: 3, y: 4 }]
const result = interpolate(points)
result.x === 2 //true
result.y === 3

FAQs

Package last updated on 21 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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