A TypeScript namespace declaration for KeyboardEvent.key strings, just in case your code is allergic to enums.

Overview

ts-key-namespace

A TypeScript namespace declaration for KeyboardEvent.key strings, just in case you prefer namespaces to enums. Largely based on ts-key-enum by Nathan Friend. ts-key-enum also probably works better.

Install

npm install ts-key-namespace --save

Import

import Key from "ts-key-namespace";

Example

onKeyDown={(ev: KeyboardEvent<HTMLInputElement>)=>{
  if(ev.key === Key.Enter) {
    console.log("Stuff");
  }
}}
You might also like...

Get discord application's assets in case you don't have them on your PC

Get discord application's assets in case you don't have them on your PC

get-discord-app-assets Get discord application's assets in case you don't have them on your PC (this is also the reason why I made this script) I came

Dec 25, 2022

API for the Baby Food Introduction Application. Keep your baby's food introductions in check with this application and backtrack in case of allergies!

API for the Baby Food Introduction Application. Keep your baby's food introductions in check with this application and backtrack in case of allergies!

Baby food introduction API This API is part of the Baby Food Introduction application, which aims to help technological parents keep track of the food

Nov 25, 2022

🚨 Make the case correct, PLEASE!

🚨 CasePolice GitHub, not Github TypeScript, not Typescript macOS, not MacOS VS Code, not Vscode ... Make the case correct, PLEASE! Usage Make sure yo

Dec 26, 2022

This project demonstrates single transaction and batch transaction use case

This project demonstrates single transaction and batch transaction use case

Batch Transaction Fullstack ( Localhost:8545 ) This project demonstrates single transaction and batch transaction use case. It comes with a transactio

Dec 27, 2022

A webpack plugin to enforce case-sensitive paths when resolving module

@umijs/case-sensitive-paths-webpack-plugin A webpack plugin to enforce case-sensitive paths when resolving module, similar to the well-known case-sens

Jul 25, 2022

Switch case syntax for Svelte ✨

Switch case syntax for Svelte ✨

Svelte switch case Switch case syntax for your Svelte components. Demo · StackBlitz · NPM Package ⚡ Getting started Step 1: Add the preprocessor to yo

Dec 30, 2022

a simple wrapper nestjs dynamic module on top of surrealdb.js driver, with a consumer app to show case library in action, nothing fancy

README README Project Components Dynamic Module Consumer App Install SurrealDb Starts SurrealDb Init surrealDb Database Run App from Source Code Launc

Oct 3, 2022

🌸 It's a frontend case for CicekSepeti

Ciceksepeti Frontend Case When we change the category all filters are reset byself. You can make empty search for listing all items again. Getting Sta

Sep 13, 2022

A TypeScript library for OPAQUE Asymmetric Password-Authenticated Key Exchange Protocol

A TypeScript library for OPAQUE Asymmetric Password-Authenticated Key Exchange Protocol

opaque-ts This is a Typescript library for the Asymmetric Password-Authenticated Key Exchange (OPAQUE) protocol. Use Available at: @cloudflare/opaque-

Dec 30, 2022
Owner
Daniel Soohan Park
CSE at Hanyang University / Web Front-End and Client Dev at Swink / ReactJS / React Native / Cocos Creator / Cordova
Daniel Soohan Park
A typescript transform that converts exported const enums into object literal.

ts-transformer-optimize-const-enum A typescript transformer that convert exported const enum into object literal. This is just like the one from @babe

Fonger 22 Jul 27, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
NoExGen is a node.js express application generator with modern folder structure, namespace/project mapping and much more! It contains preconfigured Settings and Routing files, ready to be used in any project.

Installation $ npm install -g noexgen Quick Start You can use Node Package Execution to create your node-express application as shown below: Create th

Souvik Sen 7 Oct 8, 2022
Tool to sign data with a Cardano-Secret-Key // verify data with a Cardano-Public-Key // generate CIP-8 & CIP-36 data

Tool to sign data with a Cardano-Secret-Key // verify data with a Cardano-Public-Key // generate CIP-8 & CIP-36 data

Martin Lang 11 Dec 21, 2022
JavaScript enums using proxies.

enum-xyz JavaScript enums using proxies. Based on this tweet Install $ npm install enum-xyz --save Usage Strings import Enum from 'enum-xyz' const {

Chase Fleming 38 Oct 22, 2022
Small TS library to type and safely handle `serde` JSON serializations of Rust enums.

rustie-ts TypeScript library with helper types and functions to type-safely handle Rust's serde JSON serialization of Enums. It can also be used stand

Kelvin Steiner Santos 4 Jul 17, 2022
Fix for Object.keys, which normally just returns an array of strings, which is not good when you care about strong typing

Welcome to ts-object-keys ?? Fix for Object.keys, which normally just returns an array of strings, which is not good when you care about strong typing

Funtal Foundation 1 Jul 4, 2022
A leetcode workspace template with test case runner for JavaScript/TypeScript programmers.

leetcode-typescript-workspace English | 简体中文 A vscode workspace template with test case runner script for JavaScript/TypeScript programmers using exte

null 10 Dec 13, 2022