Skip to content

Commit 467527b

Browse files
committed
build: out-source eventOn in dedicated package
1 parent 19d2c20 commit 467527b

File tree

6 files changed

+9
-21
lines changed

6 files changed

+9
-21
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
},
8181
"dependencies": {
8282
"babel-runtime": "^6.26.0",
83+
"callforth": "^0.3.0",
8384
"jsqr": "^1.2.0",
8485
"webrtc-adapter": "^6.2.1"
8586
},

src/misc/camera.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import adapterFactory from "webrtc-adapter/src/js/adapter_factory.js";
22
import { StreamApiNotSupportedError } from "./errors.js";
33
import { imageDataFromVideo } from "./image-data.js";
4-
import { eventOn } from "./promisify.js";
4+
import { eventOn } from "callforth";
55

66
class Camera {
77
constructor(videoEl, stream) {

src/misc/image-data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { DropImageFetchError, DropImageDecodeError } from "./errors.js";
2-
import { eventOn } from "./promisify.js";
2+
import { eventOn } from "callforth";
33

44
const canvas = document.createElement("canvas");
55
const canvasCtx = canvas.getContext("2d");

src/misc/promisify.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/misc/scanner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { eventOn } from "./promisify.js";
1+
import { eventOn } from "callforth";
22
import Worker from "./worker.js";
33

44
export async function scan(imageData) {

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,11 @@ caller-path@^2.0.0:
13921392
dependencies:
13931393
caller-callsite "^2.0.0"
13941394

1395+
callforth@^0.3.0:
1396+
version "0.3.0"
1397+
resolved "https://registry.yarnpkg.com/callforth/-/callforth-0.3.0.tgz#3ff358c8bc67f72afae1a11dd90835e8139d9fe6"
1398+
integrity sha512-f2WARW6XXXZBEUshqoBhcWq9UxCYSCFJ0C3/hpdoXQTnhos3HQV1z7ATJVDmTp4LgjZ0leW2mBhp6T797PhwDQ==
1399+
13951400
callsites@^0.2.0:
13961401
version "0.2.0"
13971402
resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca"

0 commit comments

Comments
 (0)