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

add node modules to repo

This commit is contained in:
s2
2018-06-03 13:47:11 +02:00
parent e8c95255e8
commit d002126b72
4115 changed files with 440218 additions and 7519 deletions

42
app/node_modules/keyboardevents-areequal/README.md generated vendored Normal file
View File

@@ -0,0 +1,42 @@
# 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

4
app/node_modules/keyboardevents-areequal/example.js generated vendored Normal file
View File

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

39
app/node_modules/keyboardevents-areequal/index.js generated vendored Normal file
View File

@@ -0,0 +1,39 @@
'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;

21
app/node_modules/keyboardevents-areequal/license generated vendored Normal file
View File

@@ -0,0 +1,21 @@
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.

62
app/node_modules/keyboardevents-areequal/package.json generated vendored Normal file
View File

@@ -0,0 +1,62 @@
{
"_args": [
[
"keyboardevents-areequal@0.2.2",
"/home/s2/Documents/Code/gitlit/app"
]
],
"_from": "keyboardevents-areequal@0.2.2",
"_id": "keyboardevents-areequal@0.2.2",
"_inBundle": false,
"_integrity": "sha512-Nv+Kr33T0mEjxR500q+I6IWisOQ0lK1GGOncV0kWE6n4KFmpcu7RUX5/2B0EUtX51Cb0HjZ9VJsSY3u4cBa0kw==",
"_location": "/keyboardevents-areequal",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "keyboardevents-areequal@0.2.2",
"name": "keyboardevents-areequal",
"escapedName": "keyboardevents-areequal",
"rawSpec": "0.2.2",
"saveSpec": null,
"fetchSpec": "0.2.2"
},
"_requiredBy": [
"/electron-localshortcut"
],
"_resolved": "https://registry.npmjs.org/keyboardevents-areequal/-/keyboardevents-areequal-0.2.2.tgz",
"_spec": "0.2.2",
"_where": "/home/s2/Documents/Code/gitlit/app",
"author": {
"name": "Andrea",
"email": "andrea@parro.it"
},
"bugs": {
"url": "https://github.com/parro-it/keyboardevents-areequal/issues"
},
"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"
}