Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
@daniel.husar/on-enter-or-space
Advanced tools
Execute function for enter and space keyboard events. This is usefull if you want to make your app accessible, and you want to add keyboard navigation to the components that have onClick handlers.
Using npm
npm install @daniel.husar/on-enter-or-space
Using yarn
yarn add @daniel.husar/on-enter-or-space
First time you call onEnterOrSpace(callback)
it will return another function, that accepts event object. If the event object was enter or space, it will call the callback
with event object as parameter.
import onEnterOrSpace from '@daniel.husar/on-enter-or-space';
const component = (props) => {
return <span onClick={props.handleOnClick} onKeyDown={onEnterOrSpace(props.handleOnClick)} />;
};
Type: Function
Default: undefined
Required: true
Function you want to execute when enter or space event was passed in.
MIT © Daniel Husar
FAQs
Execure callback when enter or space is pressed
The npm package @daniel.husar/on-enter-or-space receives a total of 3 weekly downloads. As such, @daniel.husar/on-enter-or-space popularity was classified as not popular.
We found that @daniel.husar/on-enter-or-space 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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.