summaryrefslogtreecommitdiff
path: root/alarm/node_modules/@tootallnate/once/dist
diff options
context:
space:
mode:
Diffstat (limited to 'alarm/node_modules/@tootallnate/once/dist')
-rw-r--r--alarm/node_modules/@tootallnate/once/dist/index.d.ts14
-rw-r--r--alarm/node_modules/@tootallnate/once/dist/index.js39
-rw-r--r--alarm/node_modules/@tootallnate/once/dist/index.js.map1
3 files changed, 0 insertions, 54 deletions
diff --git a/alarm/node_modules/@tootallnate/once/dist/index.d.ts b/alarm/node_modules/@tootallnate/once/dist/index.d.ts
deleted file mode 100644
index a7efe94..0000000
--- a/alarm/node_modules/@tootallnate/once/dist/index.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-/// <reference types="node" />
-import { EventEmitter } from 'events';
-declare function once<T>(emitter: EventEmitter, name: string): once.CancelablePromise<T>;
-declare namespace once {
- interface CancelFunction {
- (): void;
- }
- interface CancelablePromise<T> extends Promise<T> {
- cancel: CancelFunction;
- }
- type CancellablePromise<T> = CancelablePromise<T>;
- function spread<T extends any[]>(emitter: EventEmitter, name: string): once.CancelablePromise<T>;
-}
-export = once;
diff --git a/alarm/node_modules/@tootallnate/once/dist/index.js b/alarm/node_modules/@tootallnate/once/dist/index.js
deleted file mode 100644
index bfd0dc8..0000000
--- a/alarm/node_modules/@tootallnate/once/dist/index.js
+++ /dev/null
@@ -1,39 +0,0 @@
-"use strict";
-function noop() { }
-function once(emitter, name) {
- const o = once.spread(emitter, name);
- const r = o.then((args) => args[0]);
- r.cancel = o.cancel;
- return r;
-}
-(function (once) {
- function spread(emitter, name) {
- let c = null;
- const p = new Promise((resolve, reject) => {
- function cancel() {
- emitter.removeListener(name, onEvent);
- emitter.removeListener('error', onError);
- p.cancel = noop;
- }
- function onEvent(...args) {
- cancel();
- resolve(args);
- }
- function onError(err) {
- cancel();
- reject(err);
- }
- c = cancel;
- emitter.on(name, onEvent);
- emitter.on('error', onError);
- });
- if (!c) {
- throw new TypeError('Could not get `cancel()` function');
- }
- p.cancel = c;
- return p;
- }
- once.spread = spread;
-})(once || (once = {}));
-module.exports = once;
-//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/alarm/node_modules/@tootallnate/once/dist/index.js.map b/alarm/node_modules/@tootallnate/once/dist/index.js.map
deleted file mode 100644
index 30d2049..0000000
--- a/alarm/node_modules/@tootallnate/once/dist/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,SAAS,IAAI,KAAI,CAAC;AAElB,SAAS,IAAI,CACZ,OAAqB,EACrB,IAAY;IAEZ,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAM,OAAO,EAAE,IAAI,CAAC,CAAC;IAC1C,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAA8B,CAAC;IACtE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACpB,OAAO,CAAC,CAAC;AACV,CAAC;AAED,WAAU,IAAI;IAWb,SAAgB,MAAM,CACrB,OAAqB,EACrB,IAAY;QAEZ,IAAI,CAAC,GAA+B,IAAI,CAAC;QACzC,MAAM,CAAC,GAAG,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC5C,SAAS,MAAM;gBACd,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;gBACtC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;gBACzC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC;YACjB,CAAC;YACD,SAAS,OAAO,CAAC,GAAG,IAAW;gBAC9B,MAAM,EAAE,CAAC;gBACT,OAAO,CAAC,IAAS,CAAC,CAAC;YACpB,CAAC;YACD,SAAS,OAAO,CAAC,GAAU;gBAC1B,MAAM,EAAE,CAAC;gBACT,MAAM,CAAC,GAAG,CAAC,CAAC;Y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