Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
#Key
Key is a tiny little keycode library for your browser. It makes keybound event assertions super simple.
###Example
Here's how key can work together with a DOM query library like jQuery to navigate through a [pseudo] image gallery.
var gallery = new GalleryOfAwesome();
$(window).on('keyup', function(event) {
if (key.is(key.code.arrow.left, event.which)) {
gallery.navigateLeft();
} else if (key.is(key.code.arrow.right, event.which)) {
gallery.navigateRight();
} else if (key.is(key.code.special.esc, event.which)) {
gallery.close();
}
});
You can even assert against a collection of keys, not just a specific key.
var input = $('input[type="text"]');
input.on('keydown', function (event) {
if (key.is(key.code.punctuation, event.which)) {
event.preventDefault();
window.alert('No punctuation allowed!');
}
});
###Usage
var key = window.key; // In browser
var key = require('key'); // Or package manager
###Installation
npm install key
<script src="path/to/key/build/key.min.js"></script>
###License
The content of this library is released under the MIT License by Andrew Lawson.
You can find a copy of this license at http://www.opensource.org/licenses/mit
FAQs
A tiny little keycode library
The npm package key receives a total of 230 weekly downloads. As such, key popularity was classified as not popular.
We found that key 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.