is-printable-key-event
Advanced tools
Comparing version 0.0.1 to 1.0.0
{ | ||
"name": "is-printable-key-event", | ||
"version": "0.0.1", | ||
"version": "1.0.0", | ||
"description": "Detect whether a KeyboardEvent is caused by a printable key", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -11,2 +11,17 @@ # is-printable-key-event | ||
## Usage | ||
```js | ||
import isPrintableKeyEvent from "is-printable-key-event"; | ||
element.addEventListener("keydown", function (event) { | ||
if (isPrintableKeyEvent(event) === false) { | ||
return; // ignore key down | ||
} | ||
// do something with input | ||
}); | ||
``` | ||
## References | ||
@@ -13,0 +28,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
50974
1
30