1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-03 21:00:04 +02:00

remove node_modules

This commit is contained in:
s2
2018-05-19 20:19:16 +02:00
parent 460c610361
commit a3f65f089b
1856 changed files with 0 additions and 309697 deletions

View File

@@ -1,42 +0,0 @@
# keyboardevents-areequal
[![Travis Build Status](https://img.shields.io/travis/parro-it/keyboardevents-areequal/master.svg)](http://travis-ci.org/parro-it/keyboardevents-areequal)
[![NPM downloads](https://img.shields.io/npm/dt/keyboardevents-areequal.svg)](https://npmjs.org/package/keyboardevents-areequal)
> Check if two keyboardevents objects are equals.
This module is part of an ongoing effort to make [electron-localshortcut](https://github.com/parro-it/electron-localshortcut) less error prone, using keyboard DOM listener instead of 'globalShortcut' method to trigger shortcuts handlers.
## Usage
This example check if various KeyboardEvent objects represents the same event:
```js
const areEqual = require('keyboardevents-areequal');
console.log(areEqual({ctrlKey: true, code: 'f'}, {ctrlKey: true, code: 'f'}));
// true
console.log(areEqual({code: 'f'}, {ctrlKey: true, code: 'f'}));
// false
```
## API
## Install
With [npm](https://npmjs.org/) installed, run
```bash
npm install --save keyboardevents-areequal
```
## See Also
- [`noffle/common-readme`](https://github.com/noffle/common-readme)
## License
MIT

View File

@@ -1,4 +0,0 @@
const keyboardeventsAreequal = require('keyboardevents-areequal');
console.log({keyboardeventsAreequal});

View File

@@ -1,39 +0,0 @@
'use strict';
function _lower(key) {
if (typeof key !== 'string') {
return key;
}
return key.toLowerCase();
}
function areEqual(ev1, ev2) {
if (ev1 === ev2) {
// Same object
// console.log(`Events are same.`)
return true;
}
for (const prop of ['altKey', 'ctrlKey', 'shiftKey', 'metaKey']) {
const [value1, value2] = [ev1[prop], ev2[prop]];
if (Boolean(value1) !== Boolean(value2)) {
// One of the prop is different
// console.log(`Comparing prop ${prop}: ${value1} ${value2}`);
return false;
}
}
if ((_lower(ev1.key) === _lower(ev2.key) && ev1.key !== undefined) ||
(ev1.code === ev2.code && ev1.code !== undefined)) {
// Events are equals
return true;
}
// Key or code are differents
// console.log(`key or code are differents. ${ev1.key} !== ${ev2.key} ${ev1.code} !== ${ev2.code}`);
return false;
}
module.exports = areEqual;

View File

@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2017 Andrea
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,59 +0,0 @@
{
"_from": "keyboardevents-areequal@^0.2.1",
"_id": "keyboardevents-areequal@0.2.2",
"_inBundle": false,
"_integrity": "sha512-Nv+Kr33T0mEjxR500q+I6IWisOQ0lK1GGOncV0kWE6n4KFmpcu7RUX5/2B0EUtX51Cb0HjZ9VJsSY3u4cBa0kw==",
"_location": "/keyboardevents-areequal",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "keyboardevents-areequal@^0.2.1",
"name": "keyboardevents-areequal",
"escapedName": "keyboardevents-areequal",
"rawSpec": "^0.2.1",
"saveSpec": null,
"fetchSpec": "^0.2.1"
},
"_requiredBy": [
"/electron-localshortcut"
],
"_resolved": "https://registry.npmjs.org/keyboardevents-areequal/-/keyboardevents-areequal-0.2.2.tgz",
"_shasum": "88191ec738ce9f7591c25e9056de928b40277194",
"_spec": "keyboardevents-areequal@^0.2.1",
"_where": "E:\\projects\\p\\gitlit\\app\\node_modules\\electron-localshortcut",
"author": {
"name": "Andrea",
"email": "andrea@parro.it"
},
"bugs": {
"url": "https://github.com/parro-it/keyboardevents-areequal/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Check if two keyboardevents objects are equals.",
"devDependencies": {
"ava": "^0.20.0",
"documentation": "^4.0.0-rc.1",
"rollup": "^0.43.0",
"xo": "^0.18.2"
},
"files": [
"index.js",
"example.js"
],
"homepage": "https://github.com/parro-it/keyboardevents-areequal#readme",
"keywords": [],
"license": "MIT",
"name": "keyboardevents-areequal",
"repository": {
"type": "git",
"url": "git+https://github.com/parro-it/keyboardevents-areequal.git"
},
"scripts": {
"doc": "documentation readme main.js --section=API",
"test": "rollup -c && ava && xo --ignore example.js --ignore index.js"
},
"tonicExampleFilename": "example.js",
"version": "0.2.2"
}