https://github.com/stetsd/univalid-key-logger
Simple key logger and filters handler (sandbox)
https://github.com/stetsd/univalid-key-logger
filter key-logger keyboard regexp validation
Last synced: 6 months ago
JSON representation
Simple key logger and filters handler (sandbox)
- Host: GitHub
- URL: https://github.com/stetsd/univalid-key-logger
- Owner: stetsd
- Created: 2018-03-01T03:32:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-03T17:32:33.000Z (about 8 years ago)
- Last Synced: 2025-08-16T06:21:28.062Z (11 months ago)
- Topics: filter, key-logger, keyboard, regexp, validation
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#univalid-key-logger
Simple key logger and filters handler (sandbox)
Univalid module dependency.
## Install
```sh
npm i univalid-key-logger
```
## Usage
```js
const UKL = require('univalid-key-logger');
const keyLogger = UKL();
```
## API
#### logXss(value)
Catch xss syntax
**value** - Type `string`
```js
keyLogger.logXss('');
```
#### test(value, tmp)
Tests the pattern matching.
**value** - Type `string`
**tmp** - Type `string`
In current moment available only "email" template
```js
keyLogger.test('test@mail.com', 'email');
```
#### applyFilter(filter, value)
Tests the pattern matching of symbols
**filter** - Type `string`
In current moment available patterns supporting "univalid-strategy-form" module:
* oL - only latin symbols
* oC - only cyrillic symbols
* oN - only numbers
* oP - only numbers and latin symbols
**value** - Type `string`
```js
keyLogger.applyFilter('oL', 'I am bored');
```
#### onFilter(event, filter)
Tests the pattern matching of symbols (by event)
**event** - Type `object` - native object of event
**filter** - Type `string`
In current moment available patterns supporting "univalid-strategy-form" module:
* oL - only latin symbols
* oC - only cyrillic symbols
* oN - only numbers
* oP - only numbers and latin symbols
```js
keyLogger.onFilter(e, 'oC');
```
## License
ISC©