swipehandler
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -40,3 +40,2 @@ "use strict"; | ||
let sum_xx = 0; | ||
let sum_yy = 0; | ||
for (let i = 0; i < n; i++) { | ||
@@ -47,3 +46,2 @@ sum_x += x[i]; | ||
sum_xx += x[i] * x[i]; | ||
sum_yy += y[i] * y[i]; | ||
} | ||
@@ -154,3 +152,3 @@ const slope = (n * sum_xy - sum_x * sum_y) / (n * sum_xx - sum_x * sum_x); | ||
let i = 0; | ||
let key = Symbol("swipehandler"); | ||
const key = Symbol("swipehandler"); | ||
return (obj) => { | ||
@@ -188,3 +186,3 @@ if (!(key in obj)) { | ||
for (const key in events) { | ||
if (events.hasOwnProperty(key)) { | ||
if (Object.prototype.hasOwnProperty.call(events, key)) { | ||
events[key](data); | ||
@@ -191,0 +189,0 @@ } |
{ | ||
"name": "swipehandler", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A handler for swipe events", | ||
@@ -14,5 +14,6 @@ "main": "dist/swipe-handler.js", | ||
"build:esm": "npm run build-common -- --outfile=./dist/swipe-handler.mjs --format=esm", | ||
"build:example": "npm run build-common -- --outfile=./example/swipe-handler.js --format=esm", | ||
"build:iife": "npm run build-common -- --outfile=./dist/swipe-handler.iife.js --format=iife --global-name=_sh --footer:js=\"var SwipeHandler = _sh.default;\"", | ||
"build:example": "npm run build:iife -- --outfile=./example/swipe-handler.js", | ||
"build-common": "esbuild ./src/index.ts --bundle", | ||
"build:declarations": "npx tsc --emitDeclarationOnly 1> /dev/null || true", | ||
"build:declarations": "npx tsc --emitDeclarationOnly -noResolve 1> /dev/null || true", | ||
"format": "prettier --loglevel warn --write \"**/*.{js,css,md}\"" | ||
@@ -19,0 +20,0 @@ }, |
Sorry, the diff of this file is not supported yet
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
21347
7
580
1
8