Skip to content

Commit

Permalink
Version bump to 3.0.0!
Browse files Browse the repository at this point in the history
  • Loading branch information
ten1seven committed Jun 21, 2016
1 parent 032d249 commit 809d89c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 22 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# What Input?

## What Input is now v2
## What Input is now v3

Because of the ever-shifing complexity of supporting module loaders, __What Input__ v2 no longer supports UMD module loading (e.g., `var WhatInput = require('what-input')`). You can still require What Input without assigning a variable (e.g., `require('what-input')`).

If you need UMD module loading, check out the last [v1.x.x](https://github.com/ten1seven/what-input/releases/tag/v1.2.5) release or [open a ticket](https://github.com/ten1seven/what-input/issues) so I can assess demand.
UMD is back thanks to [mAAdhaTTah](https://github.com/mAAdhaTTah)!

## About What Input

Expand Down Expand Up @@ -58,6 +56,10 @@ Or require with a script loader.

```javascript
require('what-input');

// or

var whatInput = require('what-input');
```

What Input will start doing its thing while you do yours.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "what-input",
"version": "2.1.1",
"version": "3.0.0",
"homepage": "https://github.com/ten1seven/what-input",
"authors": [
"Jeremy Fields <[email protected]>"
Expand Down
13 changes: 4 additions & 9 deletions dist/what-input.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* what-input - A global utility for tracking the current input method (mouse, keyboard or touch).
* @version v2.1.0
* @version v3.0.0
* @link https://github.com/ten1seven/what-input
* @license MIT
*/
Expand Down Expand Up @@ -154,7 +154,7 @@ return /******/ (function(modules) { // webpackBootstrap
*/

// allows events that are also triggered to be filtered out for `touchstart`
function eventBuffer() {
function eventBuffer(event) {
clearTimer();
setInput(event);

Expand All @@ -168,11 +168,6 @@ return /******/ (function(modules) { // webpackBootstrap
if (!buffer) setInput(event);
}

function unBufferedEvent(event) {
clearTimer();
setInput(event);
}

function clearTimer() {
window.clearTimeout(timer);
}
Expand Down Expand Up @@ -274,8 +269,8 @@ return /******/ (function(modules) { // webpackBootstrap
body.addEventListener(mouseWheel, bufferedEvent);

// keyboard events
body.addEventListener('keydown', unBufferedEvent);
body.addEventListener('keyup', unBufferedEvent);
body.addEventListener('keydown', eventBuffer);
body.addEventListener('keyup', eventBuffer);
document.addEventListener('keyup', unLogKeys);
}

Expand Down
4 changes: 2 additions & 2 deletions dist/what-input.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "what-input",
"version": "2.1.1",
"version": "3.0.0",
"description": "A global utility for tracking the current input method (mouse, keyboard or touch).",
"main": "dist/what-input.js",
"repository": {
Expand Down
5 changes: 0 additions & 5 deletions src/what-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,6 @@ module.exports = (function() {
if (!buffer) setInput(event);
}

function unBufferedEvent(event) {
clearTimer();
setInput(event);
}

function clearTimer() {
window.clearTimeout(timer);
}
Expand Down

0 comments on commit 809d89c

Please sign in to comment.