@github/hotkey
Advanced tools
Comparing version 1.3.2 to 1.4.0
@@ -5,3 +5,3 @@ (function (global, factory) { | ||
(global = global || self, factory(global.hotkey = {})); | ||
}(this, function (exports) { 'use strict'; | ||
}(this, (function (exports) { 'use strict'; | ||
@@ -45,5 +45,75 @@ function _classCallCheck(instance, Constructor) { | ||
var Leaf = | ||
/*#__PURE__*/ | ||
function () { | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) n = o.constructor.name; | ||
if (n === "Map" || n === "Set") return Array.from(n); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
function _createForOfIteratorHelper(o) { | ||
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { | ||
if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { | ||
var i = 0; | ||
var F = function () {}; | ||
return { | ||
s: F, | ||
n: function () { | ||
if (i >= o.length) return { | ||
done: true | ||
}; | ||
return { | ||
done: false, | ||
value: o[i++] | ||
}; | ||
}, | ||
e: function (e) { | ||
throw e; | ||
}, | ||
f: F | ||
}; | ||
} | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
var it, | ||
normalCompletion = true, | ||
didErr = false, | ||
err; | ||
return { | ||
s: function () { | ||
it = o[Symbol.iterator](); | ||
}, | ||
n: function () { | ||
var step = it.next(); | ||
normalCompletion = step.done; | ||
return step; | ||
}, | ||
e: function (e) { | ||
didErr = true; | ||
err = e; | ||
}, | ||
f: function () { | ||
try { | ||
if (!normalCompletion && it.return != null) it.return(); | ||
} finally { | ||
if (didErr) throw err; | ||
} | ||
} | ||
}; | ||
} | ||
var Leaf = /*#__PURE__*/function () { | ||
function Leaf(trie) { | ||
@@ -82,5 +152,3 @@ _classCallCheck(this, Leaf); | ||
}(); | ||
var RadixTrie = | ||
/*#__PURE__*/ | ||
function () { | ||
var RadixTrie = /*#__PURE__*/function () { | ||
function RadixTrie(trie) { | ||
@@ -268,8 +336,7 @@ _classCallCheck(this, RadixTrie); | ||
if (leaves && leaves.length) { | ||
var _iteratorNormalCompletion = true; | ||
var _didIteratorError = false; | ||
var _iteratorError = undefined; | ||
var _iterator = _createForOfIteratorHelper(leaves), | ||
_step; | ||
try { | ||
for (var _iterator = leaves[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
for (_iterator.s(); !(_step = _iterator.n()).done;) { | ||
var leaf = _step.value; | ||
@@ -279,14 +346,5 @@ leaf && leaf["delete"](element); | ||
} catch (err) { | ||
_didIteratorError = true; | ||
_iteratorError = err; | ||
_iterator.e(err); | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion && _iterator["return"] != null) { | ||
_iterator["return"](); | ||
} | ||
} finally { | ||
if (_didIteratorError) { | ||
throw _iteratorError; | ||
} | ||
} | ||
_iterator.f(); | ||
} | ||
@@ -308,2 +366,2 @@ } | ||
})); | ||
}))); |
{ | ||
"name": "@github/hotkey", | ||
"version": "1.3.2", | ||
"version": "1.4.0", | ||
"description": "", | ||
"main": "dist/index.umd.js", | ||
"module": "dist/index.esm.js", | ||
"module": "dist/index.js", | ||
"types": "index.d.ts", | ||
"repository": "github/hotkey", | ||
"scripts": { | ||
"build": "rollup -c && cp src/index.js.flow dist/index.esm.js.flow && cp src/index.js.flow dist/index.umd.js.flow", | ||
"build": "rollup -c && cp src/index.js.flow dist/index.js.flow && cp src/index.js.flow dist/index.umd.js.flow", | ||
"lint": "github-lint", | ||
@@ -24,21 +24,22 @@ "test": "karma start test/karma.config.js", | ||
"keywords": [], | ||
"author": "", | ||
"license": "MIT", | ||
"prettier": "@github/prettier-config", | ||
"devDependencies": { | ||
"@babel/core": "^7.4.5", | ||
"@babel/plugin-proposal-class-properties": "^7.4.4", | ||
"@babel/preset-env": "^7.4.5", | ||
"@babel/preset-flow": "^7.0.0", | ||
"@babel/core": "^7.9.0", | ||
"@babel/plugin-proposal-class-properties": "^7.8.3", | ||
"@babel/preset-env": "^7.9.5", | ||
"@babel/preset-flow": "^7.9.0", | ||
"@github/prettier-config": "0.0.4", | ||
"chai": "^4.2.0", | ||
"eslint": "^6.0.1", | ||
"eslint-plugin-github": "^3.0.0", | ||
"flow-bin": "^0.102.0", | ||
"karma": "^4.1.0", | ||
"eslint": "^6.8.0", | ||
"eslint-plugin-github": "^3.4.1", | ||
"flow-bin": "^0.122.0", | ||
"karma": "^5.0.0", | ||
"karma-chai": "^0.1.0", | ||
"karma-chrome-launcher": "^2.2.0", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-mocha": "^1.3.0", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"mocha": "^6.1.4", | ||
"rollup": "^1.16.3", | ||
"rollup-plugin-babel": "^4.3.3" | ||
"mocha": "^7.1.1", | ||
"rollup": "^2.4.0", | ||
"rollup-plugin-babel": "^4.4.0" | ||
}, | ||
@@ -45,0 +46,0 @@ "eslintIgnore": [ |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
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
22575
17
485
2