makeup-prevent-scroll-keys
Advanced tools
Comparing version 0.0.2 to 0.0.3
14
index.js
'use strict'; | ||
function onKeyDown(e) { | ||
if (e.keyCode >= 32 && e.keyCode <= 36 || e.keyCode === 38 || e.keyCode === 40) { | ||
e.preventDefault(); | ||
} | ||
if (e.keyCode >= 32 && e.keyCode <= 36 || e.keyCode === 38 || e.keyCode === 40) { | ||
e.preventDefault(); | ||
} | ||
} | ||
function add(el) { | ||
el.addEventListener('keydown', onKeyDown); | ||
el.addEventListener('keydown', onKeyDown); | ||
} | ||
function remove(el) { | ||
el.removeEventListener('keydown', onKeyDown); | ||
el.removeEventListener('keydown', onKeyDown); | ||
} | ||
module.exports = { | ||
add: add, | ||
remove: remove | ||
add: add, | ||
remove: remove | ||
}; |
{ | ||
"name": "makeup-prevent-scroll-keys", | ||
"description": "Prevents default scroll event when pressing down arrow, page down, spacebar, etc.", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"main": "index.js", | ||
@@ -11,18 +11,18 @@ "repository": "https://github.com/makeup-js/makeup-prevent-scroll-keys.git", | ||
"start": "npm run build && parallelshell \"npm run server\" \"npm run watch\"", | ||
"test": "npm run transpile && npm run lasso:test && npm run clean && karma start --autoWatch false --singleRun true", | ||
"prepublishOnly": "npm run clean && npm run lint && npm run test && npm run build", | ||
"build": "npm run transpile && npm run lasso", | ||
"test": "npm run build:module && npm run lasso:tests && karma start --autoWatch false --singleRun true", | ||
"prepublishOnly": "npm run lint && npm run test && npm run clean:tests && npm run build:docs", | ||
"prep": "npm run prepublishOnly", | ||
"build": "npm run build:module && npm run build:docs", | ||
"build:module": "babel src/index.js --out-file index.js", | ||
"build:docs": "babel docs/src/index.js --out-file docs/index.js && npm run lasso:docs && npm run clean:docs", | ||
"fix": "eslint src/index.js --fix", | ||
"lint": "eslint src/index.js > lint.txt", | ||
"lasso": "lasso require-run:./docs/index.js --out docs/static --inject-into docs/index.html --name bundle && npm run clean:lasso", | ||
"lasso:test": "lasso require-run:./test/index.js --name bundle-test --out test/static --config ./test/lasso-config.json && npm run clean:lasso", | ||
"clean": "rimraf reports .DS_Store test/.DS_Store src/.DS_Store docs/.DS_Store && npm run clean:lasso", | ||
"clean:lasso": "rimraf .cache build", | ||
"lint": "eslint src/index.js > lint.txt && eslint docs/src/index.js > lint.txt", | ||
"lasso:docs": "lasso require-run:./docs/index.js --out docs/static --inject-into docs/index.html --name bundle", | ||
"lasso:tests": "npm run clean:tests && lasso require-run:./test/index.js --name bundle-test --out test/static --config ./test/lasso-config.json", | ||
"clean:docs": "rimraf .cache build docs/index.js", | ||
"clean:tests": "rimraf lint.txt reports", | ||
"server": "browser-sync start -s --ss docs --index docs/index.html --files docs/index.html", | ||
"watch": "onchange src/*.js docs/index.js -- npm run build", | ||
"transpile": "babel src/index.js --out-file index.js" | ||
"watch": "onchange src/*.js docs/src/index.js -- npm run build", | ||
"version": "npm run prepublishOnly && git add -A docs/static test/static" | ||
}, | ||
"pre-commit": [ | ||
"prepublishOnly" | ||
], | ||
"keywords": [ | ||
@@ -35,19 +35,21 @@ "makeup", | ||
"devDependencies": { | ||
"babel-cli": "^6", | ||
"@babel/cli": "^7", | ||
"@babel/core": "^7", | ||
"@babel/preset-env": "^7", | ||
"babel-plugin-transform-object-assign": "^6", | ||
"babel-preset-env": "^1", | ||
"browser-sync": "^2", | ||
"core-js-pure": "^3", | ||
"coveralls": "^3", | ||
"eslint": "^4", | ||
"eslint-config-ebay": "~0.1", | ||
"jasmine-core": "^2", | ||
"karma": "^1", | ||
"eslint": "^5", | ||
"eslint-config-ebay": "^1", | ||
"jasmine-core": "^3", | ||
"karma": "^4", | ||
"karma-chrome-launcher": "^2", | ||
"karma-coverage": "^1", | ||
"karma-html-reporter": "~0.2", | ||
"karma-jasmine": "^1", | ||
"karma-phantomjs-launcher": "^1", | ||
"karma-jasmine": "^2", | ||
"lasso-cli": "^2", | ||
"onchange": "^3", | ||
"onchange": "^5", | ||
"parallelshell": "^3", | ||
"pre-commit": "^1", | ||
"puppeteer": "^1", | ||
"rimraf": "^2" | ||
@@ -54,0 +56,0 @@ }, |
Sorry, the diff of this file is not supported yet
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
247050
0
20