Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
sinusoidal-decimal
Advanced tools
Input a number and a range (min-max), get the number's position along the range eased by a sine curve
This is a lightweight way to apply a sine curve to numbers in a numeric range.
It is similar to easing, but intended for cases where you have a numeric start point, end point, and position(s) relative to these points.
const sinusoidal = require('sinusoidal-decimal')
// Usage: sinusoidal(value, min, max, returnDecimal)
sinusoidal(0, 10, 50) // 10
sinusoidal(10, 10, 50) // 10
sinusoidal(20, 10, 50) // 15.8578...
sinusoidal(30, 10, 50) // 30
sinusoidal(40, 10, 50) // 44.1421...
sinusoidal(50, 10, 50) // 50
sinusoidal(60, 10, 50) // 50
// If returnDecimal flag is true, returns decimal position on sine curve
sinusoidal(0, 10, 50, true) // 0
sinusoidal(10, 10, 50, true) // 0
sinusoidal(20, 10, 50, true) // 0.1464...
sinusoidal(30, 10, 50, true) // 0.5
sinusoidal(40, 10, 50, true) // 0.8535...
sinusoidal(50, 10, 50, true) // 1
sinusoidal(60, 10, 50, true) // 1
MIT
FAQs
Input a number and a range (min-max), get the number's position along the range eased by a sine curve
We found that sinusoidal-decimal demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.