-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
45 lines (45 loc) · 1.73 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
"name": "drag-stream",
"version": "0.0.2",
"description": "streamable mouse drag data",
"main": "index.js",
"directories": {
"test": "test"
},
"dependencies": {
"domnode-dom": "~0.0.X",
"through": "~1.1.1"
},
"devDependencies": {
"jsdom": "0.2.19"
},
"scripts": {
"test": "node test/index.js"
},
"repository": {
"type": "git",
"url": "git://github.com/chrisdickinson/drag-stream.git"
},
"keywords": [
"readable",
"stream",
"browserify",
"drag"
],
"author": {
"name": "Chris Dickinson",
"email": "chris@neversaw.us"
},
"license": "MIT",
"readme": "# drag-stream\n\nA readable stream of drag data for an element.\n\n```javascript\n\nvar drag = require('../index')\n , el = document.getElementById('content')\n\ndrag(el)\n .on('data', function(data) {\n // data == {dx:int, dy:int, dt:int}\n })\n .pipe(\n through(function(data) {\n this.emit('data', [data.dx, data.dy, data.dt].join(', ')) \n })\n )\n\n```\n\n## API\n\n### require('drag-stream') -> drag(el)\n\n### drag(el) -> readable stream\n\nThe stream will emit data events between a mousedown on the target `el`\nand mouseup anywhere else on the page.\n\nThe data events take the form of an x-delta, y-delta, and time-delta.\n\nWhen a drag is started, its time-delta will be `0` and its x and y deltas\nwill be the screen offset of the initial mousedown event.\n\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/chrisdickinson/drag-stream/issues"
},
"_id": "drag-stream@0.0.2",
"dist": {
"shasum": "44189d1ca95830dc1d2269f32be9031f4eae9f35"
},
"_from": "drag-stream@0.0.2",
"_resolved": "https://registry.npmjs.org/drag-stream/-/drag-stream-0.0.2.tgz"
}