
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Colorful shadows for your images. 🎨
cosha
lets you add colorful shadows to your images. Try it out and look for yourself—it really couldn't be easier to set up!
npm i cosha
<!-- on an img tag -->
<img src="palm-tree.jpg" alt="nice vibes" class="colorful-shadow"/>
<!-- on a picture tag -->
<picture class="colorful-shadow">
<source srcset="palm-tree-1200.jpg 1200w, palm-tree-800.jpg 800w, palm-tree-400.jpg 400w" type="image/jpeg">
<source srcset="palm-tree-1200.webp 1200w, palm-tree-800.webp 800w, palm-tree-400.webp 400w" type="image/webp">
<img src="palm-tree-400.jpg" alt="nice vibes"/>
</picture>
import cosha from "cosha";
cosha({
className: "colorful-shadow",
blur: "10px",
brightness: "125%",
saturation: "110%",
x: "2px",
y: "6px"
});
Alternatively, if that module bundler stuff isn't for you, you can get it directly from https://unpkg.com/cosha
.
<script type="module">
import cosha from "https://unpkg.com/cosha";
cosha();
</script>
Everything in the config is optional. You can also use it by just calling cosha()
.
cosha(options);
options.className
Type: string
Default: "cosha"
The class the plugin looks for. This should be on the original img
or picture
node(s).
options.blur
Type: number | string
Default: "5px"
The amount of blur to apply to the image. See the CSS blur
function docs on MDN for more details.
options.brightness
Type: number | string
Default: 1
The amount of brightness to apply to the image. See the CSS brightness
function docs on MDN for more details.
options.saturation
Type: number | string
Default: 1
The amount of saturation to apply to the image. See the CSS saturation
function docs on MDN for more details.
options.x
Type: number | string
Default: 0
The amount of horizontal translation to apply to the image. See the CSS translate
function docs on MDN for more details.
options.y
Type: number | string
Default: 0
The amount of vertical translation to apply to the image. See the CSS translate
function docs on MDN for more details.
It runs in every browser except Internet Explorer. This is because of missing support for standard CSS filter
functions.
MIT
FAQs
Colorful shadows for your images. 🎨
The npm package cosha receives a total of 22 weekly downloads. As such, cosha popularity was classified as not popular.
We found that cosha 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.