
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
rainbow-gradient
Advanced tools
Generates a gradient of the colors of the rainbow.
npm install rainbow-gradient --save
oryarn add rainbow-gradient
import rainbowGradient from 'rainbow-gradient';
// Creates an array with three colors:
rainbowGradient(3);
// Creates an array with 10 colors, darkened and washed out:
rainbowGradient(10, 0.5, 0.25);
length
The number of colors in the resulting gradient array.
saturation
The saturation of the colors. 0
represents grayscale. 1
represents full color. Default: 1
.
lightness
The lightness of the colors. 0
represents black. 1
represents white. Default: 0.5
.
The function returns an array of colors based on the parameters. Each color is an array of red, green, and blue values from 0 to 255.
Example:
rainbowGradient(3)
returns:
[
[ 255, 0, 0 ],
[ 0, 255, 0 ],
[ 0, 0, 255 ]
]
FAQs
Generates a gradient of the colors of the rainbow.
The npm package rainbow-gradient receives a total of 61 weekly downloads. As such, rainbow-gradient popularity was classified as not popular.
We found that rainbow-gradient 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.