Comparing version 0.3.4 to 0.3.5
@@ -8,4 +8,13 @@ "use strict"; | ||
var callFunc = function callFunc(func, args, scope, def) { | ||
return _reshowConstant.FUNCTION === typeof func ? func.apply(scope, args) : _reshowConstant.UNDEFINED !== typeof def ? def : func; | ||
// @ts-check | ||
/** | ||
* @param {Function|any} maybeFunc | ||
* @param {Array} args | ||
* @param {any} scope | ||
* @param {any} def | ||
* @returns {any} | ||
*/ | ||
var callFunc = function callFunc(maybeFunc, args, scope, def) { | ||
return _reshowConstant.FUNCTION === typeof maybeFunc ? maybeFunc.apply(scope, args) : _reshowConstant.UNDEFINED !== typeof def ? def : maybeFunc; | ||
}; | ||
@@ -12,0 +21,0 @@ |
@@ -7,4 +7,6 @@ "use strict"; | ||
/** | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key | ||
* | ||
* Deprecated: KeyboardEvent.keyCode | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key | ||
*/ | ||
@@ -11,0 +13,0 @@ var getEventKey = function getEventKey(e) { |
{ | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"name": "call-func", | ||
@@ -32,6 +32,7 @@ "repository": { | ||
"scripts": { | ||
"clean": "find ./build -name '*.*' | xargs rm -rf", | ||
"clean": "find ./build ./types -name '*.*' | xargs rm -rf", | ||
"build:cjs": "BABEL_ENV=cjs babel src -d build/cjs/src --ignore /**/__tests__ --root-mode upward", | ||
"build:es": "BABEL_ENV=es babel src -d build/es/src --out-file-extension .mjs --root-mode upward", | ||
"build": "npm run clean && npm run build:cjs && npm run build:es", | ||
"build:type": "npx -p typescript tsc src/index.js src/**/*.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --declarationDir types", | ||
"build": "npm run clean && npm run build:cjs && npm run build:es && npm run build:type", | ||
"mochaFor": "mocha -r global-jsdom/register", | ||
@@ -42,3 +43,5 @@ "mocha": "npm run mochaFor -- 'build/es/**/__tests__/*.mjs'", | ||
}, | ||
"types": "./types/index.d.ts", | ||
"files": [ | ||
"types", | ||
"build", | ||
@@ -45,0 +48,0 @@ "package.json", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
26886
38
746