Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
quarkc-compare-image
Advanced tools
Image comparison component is realized based on Quarkc, modified according to vue-compare-image.
Image comparison component is realized based on Quarkc, modified according to vue-compare-image.
Simple web component to compare two images using slider.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hello Quark</title>
<script type="module" src="https://unpkg.com/quarkc-compare-image"></script>
<style>
body {
margin: 0;
display: grid;
justify-content: center;
}
p {
text-align: center;
}
quarkc-compare-image {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
</style>
</head>
<body>
<quarkc-compare-image
leftImage="https://vue-compare-image.yuuniworks.com/cat1.jpg"
rightImage="https://vue-compare-image.yuuniworks.com/cat2.jpg"
/>
</body>
</html>
This component can be used whether it is a Vue, React, Angular, or Jq project.
In the shell:
npm install quarkc-compare-image
In your component file:
import QuarkcCompareImage from "quarkc-compare-image";
<QuarkcCompareImage
leftImage="https://vue-compare-image.yuuniworks.com/cat1.jpg"
rightImage="https://vue-compare-image.yuuniworks.com/cat2.jpg"
/>
Prop (* required) | type | default | description |
---|---|---|---|
handleSize | number (px) | 40 | diameter of slider handle (by pixel) |
hover | boolean | false | Whether to slide at hover |
leftImage * | string | null | left image's url |
leftImageAlt | string | null | left image's alt |
leftLabel | string | null | Left image text label |
rightImage * | string | null | right image's url |
rightImageAlt | string | null | right image's alt |
rightLabel | string | null | Right image text label |
sliderLineWidth | number (px) | 2 | line width of slider (by pixel) |
sliderPositionPercentage | number (float) | 0.5 | Starting line position (from 0 to 1) |
FAQs
Image comparison component is realized based on Quarkc, modified according to vue-compare-image.
We found that quarkc-compare-image 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.